Mercurial > projects > ddmd
diff dmd/expression/Util.d @ 73:ef02e2e203c2
Updating to dmd2.033
author | korDen |
---|---|
date | Sat, 28 Aug 2010 19:42:41 +0400 |
parents | 4290d870944a |
children | 43073c7c7769 |
line wrap: on
line diff
--- a/dmd/expression/Util.d Sat Aug 28 16:19:48 2010 +0200 +++ b/dmd/expression/Util.d Sat Aug 28 19:42:41 2010 +0400 @@ -745,21 +745,28 @@ } } version (DMDV2) { - if (tb.ty == TY.Tstruct) + if (tb.ty == Tstruct) { arg = callCpCtor(loc, sc, arg); } +} - // Give error for overloaded function addresses - if (arg.op == TOK.TOKsymoff) - { - SymOffExp se = cast(SymOffExp)arg; - if (se.hasOverloads && !se.var.isFuncDeclaration().isUnique()) - arg.error("function %s is overloaded", arg.toChars()); - } + // Give error for overloaded function addresses + if (arg.op == TOKsymoff) + { + SymOffExp se = cast(SymOffExp)arg; +version (DMDV2) { + bool aux = (se.hasOverloads != 0); +} else { + bool aux = true; } - arg.rvalue(); - } + if (aux && !se.var.isFuncDeclaration().isUnique()) + arg.error("function %s is overloaded", arg.toChars()); + } + + arg.rvalue(); + } + arg = arg.optimize(WANT.WANTvalue); arguments.data[i] = cast(void*) arg; if (done)