Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5143 from 9rnsr/fix15127
Issue 15127 - Parser assertion on wrong code
- Loading branch information
Showing
2 changed files
with
21 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,20 @@ | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/ice15127.d(17): Error: basic type expected, not struct | ||
fail_compilation/ice15127.d(17): Error: identifier expected for template value parameter | ||
fail_compilation/ice15127.d(17): Error: found 'struct' when expecting ')' | ||
fail_compilation/ice15127.d(17): Error: found 'ExampleStruct' when expecting '=' | ||
fail_compilation/ice15127.d(17): Error: semicolon expected following auto declaration, not ')' | ||
fail_compilation/ice15127.d(17): Error: declaration expected, not ')' | ||
--- | ||
*/ | ||
|
||
struct ExampleStruct(S) { } | ||
|
||
template ExampleTemplate(K) | ||
{ | ||
enum ExampleTemplate(struct ExampleStruct(K)) = K; | ||
} | ||
|
||
void main() {} |