-
-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enum associated declarations accidentally allowed declaration in func…
…tion style. #1841
- Loading branch information
Showing
3 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
test/test_suite/enumerations/enum_with_associated_value_decl.c3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
enum Test2 : (usz a, usz b) { | ||
FOO = {4, 5, }, | ||
} | ||
|
||
enum Test : (usz a, usz b) { | ||
FOO = {a: 1, b: 1}, // #error: This looks like | ||
} |
I think this part can be removed,
{a: 1, b: 1}
is not a valid construct anyway, it looks like mix between designated initializers and named call args.