Mercurial > projects > ldc
comparison dmd/declaration.h @ 1358:78038e540342
Fix overload resolution issue in dmd bug 313/314 fix.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 16 May 2009 12:17:33 +0200 |
parents | 0c03ba6f7c24 |
children | 8026319762be |
comparison
equal
deleted
inserted
replaced
1357:48747003a5de | 1358:78038e540342 |
---|---|
85 FuncDeclaration *lastf; // last matching function we found | 85 FuncDeclaration *lastf; // last matching function we found |
86 FuncDeclaration *nextf; // current matching function | 86 FuncDeclaration *nextf; // current matching function |
87 FuncDeclaration *anyf; // pick a func, any func, to use for error recovery | 87 FuncDeclaration *anyf; // pick a func, any func, to use for error recovery |
88 }; | 88 }; |
89 | 89 |
90 void overloadResolveX(Match *m, FuncDeclaration *f, Expressions *arguments); | 90 void overloadResolveX(Match *m, FuncDeclaration *f, Expressions *arguments, Module* from); |
91 int overloadApply(FuncDeclaration *fstart, | 91 int overloadApply(Module* from, FuncDeclaration *fstart, |
92 int (*fp)(void *, FuncDeclaration *), | 92 int (*fp)(void *, FuncDeclaration *), |
93 void *param); | 93 void *param); |
94 | 94 |
95 /**************************************************************/ | 95 /**************************************************************/ |
96 | 96 |
218 struct AliasDeclaration : Declaration | 218 struct AliasDeclaration : Declaration |
219 { | 219 { |
220 Dsymbol *aliassym; | 220 Dsymbol *aliassym; |
221 Dsymbol *overnext; // next in overload list | 221 Dsymbol *overnext; // next in overload list |
222 int inSemantic; | 222 int inSemantic; |
223 PROT importprot; // if generated by import, store its protection | |
223 | 224 |
224 AliasDeclaration(Loc loc, Identifier *ident, Type *type); | 225 AliasDeclaration(Loc loc, Identifier *ident, Type *type); |
225 AliasDeclaration(Loc loc, Identifier *ident, Dsymbol *s); | 226 AliasDeclaration(Loc loc, Identifier *ident, Dsymbol *s); |
226 Dsymbol *syntaxCopy(Dsymbol *); | 227 Dsymbol *syntaxCopy(Dsymbol *); |
227 void semantic(Scope *sc); | 228 void semantic(Scope *sc); |
668 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | 669 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); |
669 void bodyToCBuffer(OutBuffer *buf, HdrGenState *hgs); | 670 void bodyToCBuffer(OutBuffer *buf, HdrGenState *hgs); |
670 int overrides(FuncDeclaration *fd); | 671 int overrides(FuncDeclaration *fd); |
671 int findVtblIndex(Array *vtbl, int dim); | 672 int findVtblIndex(Array *vtbl, int dim); |
672 int overloadInsert(Dsymbol *s); | 673 int overloadInsert(Dsymbol *s); |
673 FuncDeclaration *overloadExactMatch(Type *t); | 674 FuncDeclaration *overloadExactMatch(Type *t, Module* from); |
674 FuncDeclaration *overloadResolve(Loc loc, Expressions *arguments); | 675 FuncDeclaration *overloadResolve(Loc loc, Expressions *arguments, Module* from); |
675 LabelDsymbol *searchLabel(Identifier *ident); | 676 LabelDsymbol *searchLabel(Identifier *ident); |
676 AggregateDeclaration *isThis(); | 677 AggregateDeclaration *isThis(); |
677 AggregateDeclaration *isMember2(); | 678 AggregateDeclaration *isMember2(); |
678 int getLevel(Loc loc, FuncDeclaration *fd); // lexical nesting level difference | 679 int getLevel(Loc loc, FuncDeclaration *fd); // lexical nesting level difference |
679 void appendExp(Expression *e); | 680 void appendExp(Expression *e); |
742 }; | 743 }; |
743 | 744 |
744 struct FuncAliasDeclaration : FuncDeclaration | 745 struct FuncAliasDeclaration : FuncDeclaration |
745 { | 746 { |
746 FuncDeclaration *funcalias; | 747 FuncDeclaration *funcalias; |
747 | 748 PROT importprot; // if generated by import, store its protection |
749 | |
748 FuncAliasDeclaration(FuncDeclaration *funcalias); | 750 FuncAliasDeclaration(FuncDeclaration *funcalias); |
749 | 751 |
750 FuncAliasDeclaration *isFuncAliasDeclaration() { return this; } | 752 FuncAliasDeclaration *isFuncAliasDeclaration() { return this; } |
751 const char *kind(); | 753 const char *kind(); |
752 #if IN_DMD | 754 #if IN_DMD |