-
-
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 24745 - improve error message when creating an associative array …
…with the wrong syntax Signed-off-by: royalpinto007 <[email protected]> fix 24745 - issue line Signed-off-by: royalpinto007 <[email protected]>
- Loading branch information
1 parent
96d630c
commit 6c67dd7
Showing
2 changed files
with
20 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// https://issues.dlang.org/show_bug.cgi?id=24745 | ||
|
||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/test24745.d(17): Error: incorrect syntax for associative array, expected `[]`, found `{}` | ||
fail_compilation/test24745.d(17): Error: expression expected, not `:` | ||
fail_compilation/test24745.d(17): Error: incorrect syntax for associative array, expected `[]`, found `{}` | ||
fail_compilation/test24745.d(17): Error: incorrect syntax for associative array, expected `[]`, found `{}` | ||
fail_compilation/test24745.d(17): Error: expression expected, not `:` | ||
fail_compilation/test24745.d(17): Error: incorrect syntax for associative array, expected `[]`, found `{}` | ||
--- | ||
*/ | ||
|
||
void main() | ||
{ | ||
int[int] f = {1: 1, 2: 2}; | ||
} |