Index: lib/compiler/implementation/ssa/codegen.dart |
diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart |
index 90af494cf3325cbf7095db61f5bb7df9ad54a8bb..3506da47a3b227a6b412977c556b1ab1746bff58 100644 |
--- a/lib/compiler/implementation/ssa/codegen.dart |
+++ b/lib/compiler/implementation/ssa/codegen.dart |
@@ -1541,6 +1541,12 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
Selector defaultSelector) { |
// TODO(4434): For private members we need to use the untyped selector. |
if (defaultSelector.name.isPrivate()) return defaultSelector; |
+ // If [JSInvocationMirror.invokeOn] has been called, we must not create a |
+ // typed selector based on the receiver type. |
+ if (node.element == null && // Invocation is not exact. |
+ backend.compiler.enabledInvokeOn) { |
+ return defaultSelector; |
+ } |
HType receiverHType = types[node.inputs[0]]; |
DartType receiverType = receiverHType.computeType(compiler); |
if (receiverType != null) { |