comparison sema/TypeCheck.d @ 176:dc9bf56b7ace

Can now use & as a unary operator and take an AddressOf
author Anders Johnsen <skabet@gmail.com>
date Thu, 24 Jul 2008 23:03:18 +0200
parents c8e26556c24d
children 491b5fc4782a
comparison
equal deleted inserted replaced
175:c8e26556c24d 176:dc9bf56b7ace
303 super.visitAssignExp(exp); 303 super.visitAssignExp(exp);
304 304
305 auto identifierType = exp.identifier.type; 305 auto identifierType = exp.identifier.type;
306 auto expType = exp.exp.type; 306 auto expType = exp.exp.type;
307 307
308 if(identifierType != expType) 308 if(!identifierType.isSame(expType))
309 { 309 {
310 if(!expType.hasImplicitConversionTo(identifierType)) 310 if(!expType.hasImplicitConversionTo(identifierType))
311 messages.report(InvalidImplicitCast, exp.loc) 311 messages.report(InvalidImplicitCast, exp.loc)
312 .arg(expType.toString) 312 .arg(expType.toString)
313 .arg(identifierType.toString); 313 .arg(identifierType.toString);