Index: pkg/compiler/lib/src/ssa/type_builder.dart |
diff --git a/pkg/compiler/lib/src/ssa/type_builder.dart b/pkg/compiler/lib/src/ssa/type_builder.dart |
index 44eb5bce9b40c7475c6665a441a0df8af90d1d8c..5724e107ed2824759d64de5217f5eb9cc80d163e 100644 |
--- a/pkg/compiler/lib/src/ssa/type_builder.dart |
+++ b/pkg/compiler/lib/src/ssa/type_builder.dart |
@@ -250,7 +250,12 @@ class TypeBuilder { |
return new HTypeConversion.withTypeRepresentation( |
type, kind, subtype, original, typeVariable); |
} else if (type.isFunctionType) { |
- return builder.buildFunctionTypeConversion(original, type, kind); |
+ HInstruction reifiedType = |
+ analyzeTypeArgument(type, builder.sourceElement); |
+ // TypeMasks don't encode function types. |
+ TypeMask refinedMask = original.instructionType; |
+ return new HTypeConversion.withTypeRepresentation( |
+ type, kind, refinedMask, original, reifiedType); |
} else { |
return original.convertType(builder.closedWorld, type, kind); |
} |