From 406ad56b97f44002a452bdaa202639f339d00165 Mon Sep 17 00:00:00 2001 From: k-hara Date: Wed, 29 Aug 2012 01:01:47 +0900 Subject: [PATCH] Need more hack for bug 7757 --- src/delegatize.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/delegatize.c b/src/delegatize.c index b08892f1ff3a..8b7cae982186 100644 --- a/src/delegatize.c +++ b/src/delegatize.c @@ -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);