-
-
Notifications
You must be signed in to change notification settings - Fork 593
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix issue 8684 by bailing early in parseArguments
added test example, simplified logic per @rainers suggestion
- Loading branch information
Showing
3 changed files
with
29 additions
and
16 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,16 @@ | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/diag8684.d(11): Error: found `;` when expecting `)` | ||
fail_compilation/diag8684.d(12): Error: semicolon expected, not `for` | ||
--- | ||
*/ | ||
|
||
int foo(int n, int m) | ||
{ | ||
int x = foo( 5, m; | ||
for (int q=0; q<10; ++q){ | ||
++q; | ||
} | ||
return 2; | ||
} |
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 |
---|---|---|
@@ -1,18 +1,13 @@ | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/ice11967.d(18): Error: use `@(attributes)` instead of `[attributes]` | ||
fail_compilation/ice11967.d(18): Error: expression expected, not `%` | ||
fail_compilation/ice11967.d(18): Error: found `g` when expecting `,` | ||
fail_compilation/ice11967.d(19): Error: @identifier or @(ArgumentList) expected, not `@End of File` | ||
fail_compilation/ice11967.d(19): Error: valid attributes are `@property`, `@safe`, `@trusted`, `@system`, `@disable`, `@nogc` | ||
fail_compilation/ice11967.d(19): Error: basic type expected, not `End of File` | ||
fail_compilation/ice11967.d(19): Error: found `End of File` when expecting `}` following compound statement | ||
fail_compilation/ice11967.d(19): Error: found `End of File` when expecting `,` | ||
fail_compilation/ice11967.d(19): Error: found `End of File` when expecting `)` | ||
fail_compilation/ice11967.d(19): Error: found `End of File` when expecting `,` | ||
fail_compilation/ice11967.d(19): Error: found `End of File` when expecting `]` | ||
fail_compilation/ice11967.d(19): Error: declaration expected following attribute, not end of file | ||
fail_compilation/ice11967.d(13): Error: use `@(attributes)` instead of `[attributes]` | ||
fail_compilation/ice11967.d(13): Error: expression expected, not `%` | ||
fail_compilation/ice11967.d(13): Error: found `g` when expecting `)` | ||
fail_compilation/ice11967.d(13): Error: found `{` when expecting `]` | ||
fail_compilation/ice11967.d(14): Error: @identifier or @(ArgumentList) expected, not `@End of File` | ||
fail_compilation/ice11967.d(14): Error: valid attributes are `@property`, `@safe`, `@trusted`, `@system`, `@disable`, `@nogc` | ||
fail_compilation/ice11967.d(14): Error: declaration expected following attribute, not end of file | ||
--- | ||
*/ | ||
[F(%g{@ |