Index: pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart b/pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart |
index 96ae8890daf9b2470c5b75e2bf18b8363cd0c8ba..881b5b33b3d32a612b29d8457a4d439bab1becab 100644 |
--- a/pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart |
@@ -36,10 +36,10 @@ class ConstructorReferenceBuilder extends Builder { |
builder = scope.lookup(prefix, charOffset, fileUri); |
if (builder is PrefixBuilder) { |
PrefixBuilder prefix = builder; |
- builder = prefix.exports[middle]; |
+ builder = prefix.lookup(middle, charOffset, fileUri); |
} else if (builder is ClassBuilder) { |
ClassBuilder cls = builder; |
- builder = cls.constructors[middle]; |
+ builder = cls.findConstructorOrFactory(middle, charOffset, fileUri); |
if (suffix == null) { |
target = builder; |
return; |
@@ -47,10 +47,12 @@ class ConstructorReferenceBuilder extends Builder { |
} |
} |
if (builder is ClassBuilder) { |
- target = builder.constructors[suffix ?? ""]; |
+ target = |
+ builder.findConstructorOrFactory(suffix ?? "", charOffset, fileUri); |
} |
if (target == null) { |
- warning(null, -1, "Couldn't find constructor '$fullNameForErrors'."); |
+ warning(fileUri, charOffset, |
+ "Couldn't find constructor '$fullNameForErrors'."); |
} |
} |
} |