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 #8351 from RazvanN7/Issue_15068
Fix Issue 15068 - wrong error message on attempting to use type as template
- Loading branch information
Showing
2 changed files
with
19 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,18 @@ | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/fail15068.d(17): Error: `T!int` is not a valid template instance, because `T` is not a template declaration but a type (`T == int`) | ||
fail_compilation/fail15068.d(13): Error: template instance `fail15068.Stuff!int` error instantiating | ||
--- | ||
*/ | ||
|
||
// https://issues.dlang.org/show_bug.cgi?id=15068 | ||
|
||
void main() | ||
{ | ||
Stuff!int s; | ||
} | ||
struct Stuff(T) | ||
{ | ||
T!int var; | ||
} |