Index: pkg/analyzer/lib/src/dart/resolver/scope.dart |
diff --git a/pkg/analyzer/lib/src/dart/resolver/scope.dart b/pkg/analyzer/lib/src/dart/resolver/scope.dart |
index e90ba8619d8c29e80b562fab5adc395d6b216e2f..04da23d2409956ff40c60c03491573db05c80946 100644 |
--- a/pkg/analyzer/lib/src/dart/resolver/scope.dart |
+++ b/pkg/analyzer/lib/src/dart/resolver/scope.dart |
@@ -994,7 +994,7 @@ class PrefixedNamespace implements Namespace { |
@override |
Element get(String name) { |
- if (name.startsWith(_prefix)) { |
+ if (name.length > _length && name.startsWith(_prefix)) { |
if (name.codeUnitAt(_length) == '.'.codeUnitAt(0)) { |
return _definedNames[name.substring(_length + 1)]; |
} |