Permalink
Browse files

Need more hack for bug 7757

  • Loading branch information...
1 parent f9d53eb commit 406ad56b97f44002a452bdaa202639f339d00165 @9rnsr 9rnsr committed Aug 28, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/delegatize.c
View
@@ -37,6 +37,7 @@ Expression *Expression::toDelegate(Scope *sc, Type *t)
Type *tw = t->semantic(loc, sc);
Type *tc = t->substWildTo(MODconst)->semantic(loc, sc);
TypeFunction *tf = new TypeFunction(NULL, tc, 0, LINKd);
+ if (tw != tc) tf->mod = MODwild; // hack for bug7757
(tf = (TypeFunction *)tf->semantic(loc, sc))->next = tw; // hack for bug7757
FuncLiteralDeclaration *fld =
new FuncLiteralDeclaration(loc, loc, tf, TOKdelegate, NULL);

0 comments on commit 406ad56

Please sign in to comment.