mirror of
https://github.com/dlang/dmd.git
synced 2025-04-27 05:30:13 +03:00
30 lines
477 B
D
30 lines
477 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/ice14621.d(22): Error: static assert: `false` is false
|
|
fail_compilation/ice14621.d(28): instantiated from here: `erroneousTemplateInstantiation!()`
|
|
---
|
|
*/
|
|
|
|
void main()
|
|
{
|
|
S s;
|
|
s.foo();
|
|
}
|
|
|
|
struct S
|
|
{
|
|
float[] array;
|
|
alias array this;
|
|
|
|
template erroneousTemplateInstantiation()
|
|
{
|
|
static assert(false);
|
|
}
|
|
|
|
void foo()
|
|
{
|
|
S ret;
|
|
ret[] = erroneousTemplateInstantiation!();
|
|
}
|
|
}
|