Permalink
Browse files

Merge pull request #474 from donc/regression6235

Regression 6235 (introduced 2.053)
  • Loading branch information...
2 parents b628b5c + 0789b45 commit 56d4a1bc4781837823665ef7423aa7e2b2df1083 @WalterBright WalterBright committed Oct 24, 2011
Showing with 13 additions and 1 deletion.
  1. +3 −1 src/dsymbol.c
  2. +10 −0 test/compilable/interpret3.d
View
@@ -1210,7 +1210,9 @@ Dsymbol *ArrayScopeSymbol::search(Loc loc, Identifier *ident, int flags)
* or a variable (in which case an expression is created in
* toir.c).
*/
- v->init = new VoidInitializer(0);
+ VoidInitializer *e = new VoidInitializer(0);
+ e->type = Type::tsize_t;
+ v->init = e;
}
*pvar = v;
}
@@ -764,6 +764,16 @@ struct Bug5865 {
}
/*******************************************
+ 6235 - Regression ICE on $ in template
+*******************************************/
+
+struct Bug6235(R) {
+ enum XXX = is(typeof(R.init[0..$]) : const ubyte[]);
+}
+
+Bug6235!(ubyte[]) bug6235;
+
+/*******************************************
Bug 5840
*******************************************/

0 comments on commit 56d4a1b

Please sign in to comment.