-
-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Bugzilla 24745 - improve associative array syntax error message
Signed-off-by: royalpinto007 <royalpinto007@gmail.com> fix 24745 - issue line Signed-off-by: royalpinto007 <royalpinto007@gmail.com> fix(errors): update test cases, error messages Signed-off-by: royalpinto007 <royalpinto007@gmail.com> fix(errors): message for default comma case Signed-off-by: royalpinto007 <royalpinto007@gmail.com>
- Loading branch information
1 parent
a555e13
commit 16276df
Showing
2 changed files
with
25 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// https://issues.dlang.org/show_bug.cgi?id=24745 | ||
|
||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/test24745.d(19): Error: incorrect syntax for associative array, expected `[]`, found `{}` | ||
fail_compilation/test24745.d(19): Error: comma expected separating field initializers | ||
fail_compilation/test24745.d(19): Error: expression expected, not `:` | ||
fail_compilation/test24745.d(19): Error: comma expected separating field initializers | ||
fail_compilation/test24745.d(19): Error: incorrect syntax for associative array, expected `[]`, found `{}` | ||
fail_compilation/test24745.d(19): Error: comma expected separating field initializers | ||
fail_compilation/test24745.d(19): Error: expression expected, not `:` | ||
fail_compilation/test24745.d(19): Error: comma expected separating field initializers | ||
--- | ||
*/ | ||
|
||
void main() | ||
{ | ||
int[int] f = {1: 1, 2: 2}; | ||
} |