Struct types with duplicate fields are invalid types and weren't caught by the parser. This fixes the issue and adds some associated tests. It also checks and tests for duplicate struct value field names. As a technical side-note, this doesn't change the lang/types/ functions to remove panics-- the signatures are simplified to make their use simple, and we intentionally panic if they're used incorrectly. In this case, one was being used without having previously validated the input. Thanks to Patrick Meyer for finding this issue via fuzzing!
2 lines
76 B
Plaintext
2 lines
76 B
Plaintext
# err: err1: parser: `syntax error: unexpected $end, expecting EQUALS` @1:6
|