Mercurial > projects > dang
comparison sema/TypeCheck.d @ 191:e799db8d9cb0
Fixed a small bug. Passes two more tests now.
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Fri, 25 Jul 2008 14:44:50 +0200 |
parents | 86a2ede00e9a |
children | 658178183018 |
comparison
equal
deleted
inserted
replaced
190:85e492318bb6 | 191:e799db8d9cb0 |
---|---|
223 | 223 |
224 foreach (i, arg; exp.args) | 224 foreach (i, arg; exp.args) |
225 { | 225 { |
226 auto argType = function_type.params[i]; | 226 auto argType = function_type.params[i]; |
227 auto expType = arg.type; | 227 auto expType = arg.type; |
228 if (argType.isSame(expType)) | 228 if (!argType.isSame(expType)) |
229 { | 229 { |
230 if (!expType.hasImplicitConversionTo(argType)) | 230 if (!expType.hasImplicitConversionTo(argType)) |
231 messages.report(InvalidImplicitCast, exp.loc) | 231 messages.report(InvalidImplicitCast, exp.loc) |
232 .arg(expType.toString) | 232 .arg(expType.toString) |
233 .arg(argType.toString); | 233 .arg(argType.toString); |