Chromium Code Reviews| Index: lib/compiler/implementation/js_backend/constant_system_javascript.dart |
| =================================================================== |
| --- lib/compiler/implementation/js_backend/constant_system_javascript.dart (revision 12329) |
| +++ lib/compiler/implementation/js_backend/constant_system_javascript.dart (working copy) |
| @@ -217,4 +217,11 @@ |
| bool isString(Constant constant) => constant.isString(); |
| bool isBool(Constant constant) => constant.isBool(); |
| bool isNull(Constant constant) => constant.isNull(); |
| -} |
| + |
| + bool isSubtype(Compiler compiler, DartType s, DartType t) { |
| + if (s.element == compiler.intClass && t.element == compiler.doubleClass) { |
|
kasperl
2012/09/14 05:53:34
Add a comment that explains why this is -- and why
ngeoffray
2012/09/14 09:44:56
Done.
|
| + return true; |
| + } |
| + return compiler.types.isSubtype(s, t); |
| + } |
| +} |