Mercurial > projects > ddmd
comparison 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 |
comparison
equal
deleted
inserted
replaced
72:2e2a5c3f943a | 73:ef02e2e203c2 |
---|---|
743 { | 743 { |
744 arg = arg.castTo(sc, ta); | 744 arg = arg.castTo(sc, ta); |
745 } | 745 } |
746 } | 746 } |
747 version (DMDV2) { | 747 version (DMDV2) { |
748 if (tb.ty == TY.Tstruct) | 748 if (tb.ty == Tstruct) |
749 { | 749 { |
750 arg = callCpCtor(loc, sc, arg); | 750 arg = callCpCtor(loc, sc, arg); |
751 } | 751 } |
752 | 752 } |
753 // Give error for overloaded function addresses | 753 |
754 if (arg.op == TOK.TOKsymoff) | 754 // Give error for overloaded function addresses |
755 { | 755 if (arg.op == TOKsymoff) |
756 SymOffExp se = cast(SymOffExp)arg; | 756 { |
757 if (se.hasOverloads && !se.var.isFuncDeclaration().isUnique()) | 757 SymOffExp se = cast(SymOffExp)arg; |
758 arg.error("function %s is overloaded", arg.toChars()); | 758 version (DMDV2) { |
759 } | 759 bool aux = (se.hasOverloads != 0); |
760 } | 760 } else { |
761 arg.rvalue(); | 761 bool aux = true; |
762 } | 762 } |
763 if (aux && !se.var.isFuncDeclaration().isUnique()) | |
764 arg.error("function %s is overloaded", arg.toChars()); | |
765 } | |
766 | |
767 arg.rvalue(); | |
768 } | |
769 | |
763 arg = arg.optimize(WANT.WANTvalue); | 770 arg = arg.optimize(WANT.WANTvalue); |
764 arguments.data[i] = cast(void*) arg; | 771 arguments.data[i] = cast(void*) arg; |
765 if (done) | 772 if (done) |
766 break; | 773 break; |
767 } | 774 } |