comparison dmd/TypeTuple.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 51605de93870
children acd69f84627e
comparison
equal deleted inserted replaced
71:8e24ef1dd139 72:2e2a5c3f943a
68 } 68 }
69 } 69 }
70 this.arguments = arguments; 70 this.arguments = arguments;
71 } 71 }
72 72
73 Type syntaxCopy() 73 override Type syntaxCopy()
74 { 74 {
75 Arguments args = Argument.arraySyntaxCopy(arguments); 75 Arguments args = Argument.arraySyntaxCopy(arguments);
76 Type t = new TypeTuple(args); 76 Type t = new TypeTuple(args);
77 t.mod = mod; 77 t.mod = mod;
78 return t; 78 return t;
79 } 79 }
80 80
81 Type semantic(Loc loc, Scope sc) 81 override Type semantic(Loc loc, Scope sc)
82 { 82 {
83 //printf("TypeTuple::semantic(this = %p)\n", this); 83 //printf("TypeTuple::semantic(this = %p)\n", this);
84 //printf("TypeTuple::semantic() %s\n", toChars()); 84 //printf("TypeTuple::semantic() %s\n", toChars());
85 if (!deco) 85 if (!deco)
86 deco = merge().deco; 86 deco = merge().deco;
89 * same deco as that type. 89 * same deco as that type.
90 */ 90 */
91 return this; 91 return this;
92 } 92 }
93 93
94 bool equals(Object o) 94 override bool equals(Object o)
95 { 95 {
96 Type t; 96 Type t;
97 97
98 t = cast(Type)o; 98 t = cast(Type)o;
99 //printf("TypeTuple::equals(%s, %s)\n", toChars(), t-cast>toChars()); 99 //printf("TypeTuple::equals(%s, %s)\n", toChars(), t-cast>toChars());
117 } 117 }
118 } 118 }
119 return 0; 119 return 0;
120 } 120 }
121 121
122 Type reliesOnTident() 122 override Type reliesOnTident()
123 { 123 {
124 if (arguments) 124 if (arguments)
125 { 125 {
126 for (size_t i = 0; i < arguments.dim; i++) 126 for (size_t i = 0; i < arguments.dim; i++)
127 { 127 {
132 } 132 }
133 } 133 }
134 return null; 134 return null;
135 } 135 }
136 136
137 void toCBuffer2(OutBuffer buf, HdrGenState* hgs, MOD mod) 137 override void toCBuffer2(OutBuffer buf, HdrGenState* hgs, MOD mod)
138 { 138 {
139 Argument.argsToCBuffer(buf, hgs, arguments, 0); 139 Argument.argsToCBuffer(buf, hgs, arguments, 0);
140 } 140 }
141 141
142 void toDecoBuffer(OutBuffer buf, int flag) 142 override void toDecoBuffer(OutBuffer buf, int flag)
143 { 143 {
144 //printf("TypeTuple::toDecoBuffer() this = %p, %s\n", this, toChars()); 144 //printf("TypeTuple::toDecoBuffer() this = %p, %s\n", this, toChars());
145 Type.toDecoBuffer(buf, flag); 145 Type.toDecoBuffer(buf, flag);
146 OutBuffer buf2 = new OutBuffer(); 146 OutBuffer buf2 = new OutBuffer();
147 Argument.argsToDecoBuffer(buf2, arguments); 147 Argument.argsToDecoBuffer(buf2, arguments);
148 uint len = buf2.offset; 148 uint len = buf2.offset;
149 //buf.printf("%d%.*s", len, len, cast(char *)buf2.extractData()); 149 //buf.printf("%d%.*s", len, len, cast(char *)buf2.extractData());
150 buf.printf("%d%s", len, buf2.extractString()); 150 buf.printf("%d%s", len, buf2.extractString());
151 } 151 }
152 152
153 Expression getProperty(Loc loc, Identifier ident) 153 override Expression getProperty(Loc loc, Identifier ident)
154 { 154 {
155 Expression e; 155 Expression e;
156 156
157 version (LOGDOTEXP) { 157 version (LOGDOTEXP) {
158 printf("TypeTuple::getProperty(type = '%s', ident = '%s')\n", toChars(), ident.toChars()); 158 printf("TypeTuple::getProperty(type = '%s', ident = '%s')\n", toChars(), ident.toChars());
167 e = new ErrorExp(); 167 e = new ErrorExp();
168 } 168 }
169 return e; 169 return e;
170 } 170 }
171 171
172 TypeInfoDeclaration getTypeInfoDeclaration() 172 override TypeInfoDeclaration getTypeInfoDeclaration()
173 { 173 {
174 return new TypeInfoTupleDeclaration(this); 174 return new TypeInfoTupleDeclaration(this);
175 } 175 }
176 } 176 }