Files
mgmt/lang/interpret_test/TestAstFunc2/struct-duplicate1.output
James Shubin 70eecd5289 lang: Prevent struct types with duplicate fields
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!
2020-02-27 18:52:02 -05:00

2 lines
121 B
Plaintext

# err: err1: can't set return type in parser: `can't set return type in parser: duplicate struct field of `x int`` @1:24