Mercurial > projects > ldc
comparison dmd/expression.c @ 471:e19e20103119
Changed DMD to make a copy of the TypeFunction in DelegateExp.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Mon, 04 Aug 2008 17:32:13 +0200 |
parents | 45a67b6f1310 |
children | a34078905d01 |
comparison
equal
deleted
inserted
replaced
470:5e9883a7f9a5 | 471:e19e20103119 |
---|---|
5371 printf("DelegateExp::semantic('%s')\n", toChars()); | 5371 printf("DelegateExp::semantic('%s')\n", toChars()); |
5372 #endif | 5372 #endif |
5373 if (!type) | 5373 if (!type) |
5374 { | 5374 { |
5375 e1 = e1->semantic(sc); | 5375 e1 = e1->semantic(sc); |
5376 type = new TypeDelegate(func->type); | 5376 // LLVMDC we need a copy as we store the LLVM tpye in TypeFunction, and delegate/members have different types for 'this' |
5377 type = new TypeDelegate(func->type->syntaxCopy()); | |
5377 type = type->semantic(loc, sc); | 5378 type = type->semantic(loc, sc); |
5378 AggregateDeclaration *ad = func->toParent()->isAggregateDeclaration(); | 5379 AggregateDeclaration *ad = func->toParent()->isAggregateDeclaration(); |
5379 if (func->needThis()) | 5380 if (func->needThis()) |
5380 e1 = getRightThis(loc, sc, ad, e1, func); | 5381 e1 = getRightThis(loc, sc, ad, e1, func); |
5381 } | 5382 } |