Index: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart |
index 554e5271e35eb074d8de3acca6f66ae1f3f79769..7b8f7f0773a337cd324649f7cc2ccc943ed70fe1 100644 |
--- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart |
+++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart |
@@ -2482,7 +2482,9 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
// [arguments.head]. |
js.PropertyAccess field = |
new js.PropertyAccess.field(pop(), typeVariable.toString()); |
- js.Expression genericName = new js.LiteralString("'${arguments.head}'"); |
+ RuntimeTypeInformation rti = compiler.enqueuer.codegen.universe.rti; |
+ String typeName = rti.buildStringRepresentation(arguments.head); |
+ js.Expression genericName = new js.LiteralString("'$typeName'"); |
js.Binary eqTest = new js.Binary('===', field, genericName); |
// Also test for 'undefined' in case the object does not have |
// any type variable. |