Mercurial > projects > ldc
changeset 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 | 5e9883a7f9a5 |
children | 15c804b6ce77 |
files | dmd/expression.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dmd/expression.c Mon Aug 04 03:40:08 2008 +0200 +++ b/dmd/expression.c Mon Aug 04 17:32:13 2008 +0200 @@ -5373,7 +5373,8 @@ if (!type) { e1 = e1->semantic(sc); - type = new TypeDelegate(func->type); + // LLVMDC we need a copy as we store the LLVM tpye in TypeFunction, and delegate/members have different types for 'this' + type = new TypeDelegate(func->type->syntaxCopy()); type = type->semantic(loc, sc); AggregateDeclaration *ad = func->toParent()->isAggregateDeclaration(); if (func->needThis())