comparison sema/DType.d @ 119:c0b531362ca6

Non compileing commit. Work on floating points and casts
author Anders Johnsen <skabet@gmail.com>
date Sun, 25 May 2008 19:13:07 +0200
parents 54585ad7e426
children 7d0898f77685
comparison
equal deleted inserted replaced
118:54585ad7e426 119:c0b531362ca6
266 this(char[] name, int bits) 266 this(char[] name, int bits)
267 { 267 {
268 super(name, bits, false); 268 super(name, bits, false);
269 } 269 }
270 270
271 override bool hasImplicitConversionTo(DType that)
272 {
273 if (auto o = cast(DInteger)that)
274 return true;
275 if (auto o = cast(DReal)that)
276 return true;
277 return false;
278 }
279
271 override bool isReal() { return true; } 280 override bool isReal() { return true; }
272 override DReal asReal() { return this; } 281 override DReal asReal() { return this; }
273 } 282 }
274 283
275 class DStruct : DType 284 class DStruct : DType