Index: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart |
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart |
index 2bc367096676516be426167c5ad822175ff8150a..ea9e8936c93e46883fcfed13a49ae9505fbab361 100644 |
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart |
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart |
@@ -494,15 +494,18 @@ class MemberTypeInformation extends ElementTypeInformation |
} |
Compiler compiler = inferrer.compiler; |
- if (element.declaration == compiler.intEnvironment) { |
- giveUp(inferrer); |
- return compiler.typesTask.intType.nullable(); |
- } else if (element.declaration == compiler.boolEnvironment) { |
- giveUp(inferrer); |
- return compiler.typesTask.boolType.nullable(); |
- } else if (element.declaration == compiler.stringEnvironment) { |
- giveUp(inferrer); |
- return compiler.typesTask.stringType.nullable(); |
+ if (element.isConstructor) { |
+ ConstructorElement constructor = element; |
+ if (constructor.isIntFromEnvironmentConstructor) { |
+ giveUp(inferrer); |
+ return compiler.typesTask.intType.nullable(); |
+ } else if (constructor.isBoolFromEnvironmentConstructor) { |
+ giveUp(inferrer); |
+ return compiler.typesTask.boolType.nullable(); |
+ } else if (constructor.isStringFromEnvironmentConstructor) { |
+ giveUp(inferrer); |
+ return compiler.typesTask.stringType.nullable(); |
+ } |
} |
return null; |
} |