Index: pkg/compiler/lib/src/ssa/kernel_impact.dart |
diff --git a/pkg/compiler/lib/src/ssa/kernel_impact.dart b/pkg/compiler/lib/src/ssa/kernel_impact.dart |
index de794a45e69829088c7af774f79a8663cf0a76ac..6fa759ed7c59284a86b9d1dd3efc8d19077e0f7d 100644 |
--- a/pkg/compiler/lib/src/ssa/kernel_impact.dart |
+++ b/pkg/compiler/lib/src/ssa/kernel_impact.dart |
@@ -276,6 +276,14 @@ class KernelImpactBuilder extends ir.Visitor { |
if (commonElements.isSymbolConstructor(constructor)) { |
impactBuilder.registerFeature(Feature.SYMBOL_CONSTRUCTOR); |
} |
+ |
+ if (target.isExternal && |
+ constructor.isFromEnvironmentConstructor && |
+ !isConst) { |
+ impactBuilder.registerFeature(Feature.THROW_UNSUPPORTED_ERROR); |
+ return; |
+ } |
+ |
InterfaceType type = elementAdapter.createInterfaceType( |
target.enclosingClass, node.arguments.types); |
CallStructure callStructure = |