Skip to content

Commit

Permalink
fix Issue 9545 - ICE with member template instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
9rnsr committed Feb 20, 2013
1 parent 76fee51 commit 6c1f52e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/expression.c
Expand Up @@ -7097,7 +7097,7 @@ Expression *DotVarExp::semantic(Scope *sc)
if (e)
return e;

if (v->isDataseg()) // fix bugzilla 8238
if (v && v->isDataseg()) // fix bugzilla 8238
{
// (e1, v)
accessCheck(loc, sc, e1, v);
Expand Down
13 changes: 13 additions & 0 deletions test/fail_compilation/ice9545.d
@@ -0,0 +1,13 @@
/*
TEST_OUTPUT:
----
fail_compilation/ice9545.d(12): Error: T is not a field, but a alias
----
*/

struct S { template T(X) { alias T = X; } }

void main()
{
auto x1 = S.init.T!int; // ICE
}

0 comments on commit 6c1f52e

Please sign in to comment.