Skip to content

Commit

Permalink
fix Issue 14621 - ICE: Assertion failure: 'global.gaggedErrors || glo…
Browse files Browse the repository at this point in the history
…bal.errors' on line 752 in file 'statement.c'
  • Loading branch information
9rnsr committed Aug 25, 2015
1 parent 3b89f3e commit 6fcef51
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/fail_compilation/ice14621.d
@@ -0,0 +1,30 @@
/*
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!();
}
}

0 comments on commit 6fcef51

Please sign in to comment.