Mercurial > projects > ldc
diff dmd/mtype.c @ 1282:680b4df0ea36
Commit workaround for TypeFunction comparing issue.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Thu, 30 Apr 2009 23:16:21 +0200 |
parents | 7af860e4f403 |
children | 8026319762be |
line wrap: on
line diff
--- a/dmd/mtype.c Thu Apr 30 12:25:04 2009 +0200 +++ b/dmd/mtype.c Thu Apr 30 23:16:21 2009 +0200 @@ -2810,11 +2810,25 @@ // type to prevent merging different member function if (!mangle && funcdecl) { - if (AggregateDeclaration* ad = funcdecl->isMember()) - { - buf->writeByte('M'); - ad->type->toDecoBuffer(buf, false); - } + if (funcdecl->needThis()) + { + AggregateDeclaration* ad = funcdecl->isMember2(); + buf->writeByte('M'); + ad->type->toDecoBuffer(buf, false); + } + /* BUG This causes problems with delegate types + On the other hand, the llvm type for nested functions *is* different + so not doing anything here may be lead to bugs! + A sane solution would be DtoType(Dsymbol)... + if (funcdecl->isNested()) + { + buf->writeByte('M'); + if (funcdecl->toParent2() && funcdecl->toParent2()->isFuncDeclaration()) + { + FuncDeclaration* fd = funcdecl->toParent2()->isFuncDeclaration(); + fd->type->toDecoBuffer(buf, false); + } + }*/ } // Write argument types