Mercurial > projects > ddmd
comparison dmd/TemplateTupleParameter.d @ 72:2e2a5c3f943a
reduced warnings by adding override to the methods
think this also normalizes different line endings used all over the place
author | Trass3r |
---|---|
date | Sat, 28 Aug 2010 16:19:48 +0200 |
parents | 10317f0c89a5 |
children | 3a0b150c9841 |
comparison
equal
deleted
inserted
replaced
71:8e24ef1dd139 | 72:2e2a5c3f943a |
---|---|
29 { | 29 { |
30 super(loc, ident); | 30 super(loc, ident); |
31 this.ident = ident; | 31 this.ident = ident; |
32 } | 32 } |
33 | 33 |
34 TemplateTupleParameter isTemplateTupleParameter() | 34 override TemplateTupleParameter isTemplateTupleParameter() |
35 { | 35 { |
36 return this; | 36 return this; |
37 } | 37 } |
38 | 38 |
39 TemplateParameter syntaxCopy() | 39 override TemplateParameter syntaxCopy() |
40 { | 40 { |
41 TemplateTupleParameter tp = new TemplateTupleParameter(loc, ident); | 41 TemplateTupleParameter tp = new TemplateTupleParameter(loc, ident); |
42 return tp; | 42 return tp; |
43 } | 43 } |
44 | 44 |
45 void declareParameter(Scope sc) | 45 override void declareParameter(Scope sc) |
46 { | 46 { |
47 TypeIdentifier ti = new TypeIdentifier(loc, ident); | 47 TypeIdentifier ti = new TypeIdentifier(loc, ident); |
48 sparam = new AliasDeclaration(loc, ident, ti); | 48 sparam = new AliasDeclaration(loc, ident, ti); |
49 if (!sc.insert(sparam)) | 49 if (!sc.insert(sparam)) |
50 error(loc, "parameter '%s' multiply defined", ident.toChars()); | 50 error(loc, "parameter '%s' multiply defined", ident.toChars()); |
51 } | 51 } |
52 | 52 |
53 void semantic(Scope) | 53 override void semantic(Scope) |
54 { | 54 { |
55 } | 55 } |
56 | 56 |
57 void print(Object oarg, Object oded) | 57 override void print(Object oarg, Object oded) |
58 { | 58 { |
59 writef(" %s... [", ident.toChars()); | 59 writef(" %s... [", ident.toChars()); |
60 Tuple v = isTuple(oded); | 60 Tuple v = isTuple(oded); |
61 assert(v); | 61 assert(v); |
62 | 62 |
84 } | 84 } |
85 | 85 |
86 writef("]\n"); | 86 writef("]\n"); |
87 } | 87 } |
88 | 88 |
89 void toCBuffer(OutBuffer buf, HdrGenState* hgs) | 89 override void toCBuffer(OutBuffer buf, HdrGenState* hgs) |
90 { | 90 { |
91 buf.writestring(ident.toChars()); | 91 buf.writestring(ident.toChars()); |
92 buf.writestring("..."); | 92 buf.writestring("..."); |
93 } | 93 } |
94 | 94 |
95 Object specialization() | 95 override Object specialization() |
96 { | 96 { |
97 return null; | 97 return null; |
98 } | 98 } |
99 | 99 |
100 Object defaultArg(Loc loc, Scope sc) | 100 override Object defaultArg(Loc loc, Scope sc) |
101 { | 101 { |
102 return null; | 102 return null; |
103 } | 103 } |
104 | 104 |
105 bool overloadMatch(TemplateParameter tp) | 105 override bool overloadMatch(TemplateParameter tp) |
106 { | 106 { |
107 TemplateTupleParameter tvp = tp.isTemplateTupleParameter(); | 107 TemplateTupleParameter tvp = tp.isTemplateTupleParameter(); |
108 if (tvp) { | 108 if (tvp) { |
109 return true; // match | 109 return true; // match |
110 } | 110 } |
111 | 111 |
112 Lnomatch: | 112 Lnomatch: |
113 return false; | 113 return false; |
114 } | 114 } |
115 | 115 |
116 MATCH matchArg(Scope sc, Objects tiargs, int i, TemplateParameters parameters, Objects dedtypes, Declaration* psparam, int flags) | 116 override MATCH matchArg(Scope sc, Objects tiargs, int i, TemplateParameters parameters, Objects dedtypes, Declaration* psparam, int flags) |
117 { | 117 { |
118 //printf("TemplateTupleParameter.matchArg()\n"); | 118 //printf("TemplateTupleParameter.matchArg()\n"); |
119 | 119 |
120 /* The rest of the actual arguments (tiargs[]) form the match | 120 /* The rest of the actual arguments (tiargs[]) form the match |
121 * for the variadic parameter. | 121 * for the variadic parameter. |
140 dedtypes.data[i] = cast(void*)ovar; | 140 dedtypes.data[i] = cast(void*)ovar; |
141 | 141 |
142 return MATCH.MATCHexact; | 142 return MATCH.MATCHexact; |
143 } | 143 } |
144 | 144 |
145 void* dummyArg() | 145 override void* dummyArg() |
146 { | 146 { |
147 return null; | 147 return null; |
148 } | 148 } |
149 } | 149 } |