mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
24 lines
508 B
D
24 lines
508 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/ice1144.d(14): Error: undefined identifier `a`
|
|
fail_compilation/ice1144.d(23): Error: template instance `ice1144.testHelper!("hello", "world")` error instantiating
|
|
---
|
|
*/
|
|
|
|
// https://issues.dlang.org/show_bug.cgi?id=1144
|
|
// ICE(template.c) template mixin causes DMD crash
|
|
char[] testHelper(A ...)()
|
|
{
|
|
char[] result;
|
|
foreach (t; a)
|
|
{
|
|
result ~= "int " ~ t ~ ";\n";
|
|
}
|
|
return result;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
mixin(testHelper!("hello", "world")());
|
|
}
|