Index: pkg/compiler/lib/src/kernel/element_map_impl.dart |
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart |
index f39c7050c08581a174fb38f1d506e9e989806e05..33edd262e399b3070ec8cf7f8d8cb30b4943fbc7 100644 |
--- a/pkg/compiler/lib/src/kernel/element_map_impl.dart |
+++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart |
@@ -270,9 +270,14 @@ class KernelToElementMapImpl extends KernelToElementMapMixin { |
isExternal: isExternal, isConst: node.isConst); |
} else if (node is ir.Procedure) { |
functionNode = node.function; |
+ bool isFromEnvironment = isExternal && |
+ name.text == 'fromEnvironment' && |
+ const ['int', 'bool', 'String'].contains(enclosingClass.name); |
constructor = new KFactoryConstructor(memberIndex, enclosingClass, name, |
_getParameterStructure(functionNode), |
- isExternal: isExternal, isConst: node.isConst); |
+ isExternal: isExternal, |
+ isConst: node.isConst, |
+ isFromEnvironmentConstructor: isFromEnvironment); |
} else { |
// TODO(johnniwinther): Convert `node.location` to a [SourceSpan]. |
throw new SpannableAssertionFailure( |