comparison ast/Decl.d @ 163:362265427838

Fixes to types for constructor and also removed DFunction's from DStruct, DClass and DInterface
author Anders Johnsen <skabet@gmail.com>
date Tue, 22 Jul 2008 16:50:47 +0200
parents 6c5a3c0bb4fb
children 09150374ddf9
comparison
equal deleted inserted replaced
162:0f38f1a0f06f 163:362265427838
182 { 182 {
183 if (myType !is null) 183 if (myType !is null)
184 return myType; 184 return myType;
185 185
186 auto t = new DFunction(identifier); 186 auto t = new DFunction(identifier);
187 t.returnType = env.findType(returnType.get); 187 if ( identifier.get == "this" )
188 t.returnType = DType.Void;
189 else
190 t.returnType = env.findType(returnType.get);
188 SmallArray!(DType) array; 191 SmallArray!(DType) array;
189 foreach (a; funcArgs) 192 foreach (a; funcArgs)
190 array ~= a.type(); 193 array ~= a.type();
191 t.params = array.safe(); 194 t.params = array.safe();
192 t.firstParamIsReturnValue = this.sret; 195 t.firstParamIsReturnValue = this.sret;