Index: pkg/analyzer/lib/src/generated/incremental_resolver.dart |
diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart |
index 3a3374a2e2ae4e99d822c0fcb3a1b2527c128424..90065ecc2b1c59fa782acdf8edfed71580368ed1 100644 |
--- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart |
+++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart |
@@ -520,6 +520,29 @@ class DeclarationMatcher extends RecursiveAstVisitor { |
} |
} |
+ /** |
+ * Asserts that there is an import with the same prefix as the given |
+ * [prefixNode], which exposes the given [element]. |
+ */ |
+ void _assertElementVisibleWithPrefix( |
+ SimpleIdentifier prefixNode, Element element) { |
+ if (prefixNode == null) { |
+ return; |
+ } |
+ String prefixName = prefixNode.name; |
+ for (ImportElement import in _enclosingLibrary.imports) { |
+ if (import.prefix != null && import.prefix.name == prefixName) { |
+ Namespace namespace = |
+ new NamespaceBuilder().createImportNamespaceForDirective(import); |
+ Iterable<Element> visibleElements = namespace.definedNames.values; |
+ if (visibleElements.contains(element)) { |
+ return; |
+ } |
+ } |
+ } |
+ _assertTrue(false); |
+ } |
+ |
void _assertEquals(Object a, Object b) { |
if (a != b) { |
throw new _DeclarationMismatchException(); |
@@ -619,29 +642,6 @@ class DeclarationMatcher extends RecursiveAstVisitor { |
} |
} |
- /** |
- * Asserts that there is an import with the same prefix as the given |
- * [prefixNode], which exposes the given [element]. |
- */ |
- void _assertElementVisibleWithPrefix( |
- SimpleIdentifier prefixNode, Element element) { |
- if (prefixNode == null) { |
- return; |
- } |
- String prefixName = prefixNode.name; |
- for (ImportElement import in _enclosingLibrary.imports) { |
- if (import.prefix != null && import.prefix.name == prefixName) { |
- Namespace namespace = |
- new NamespaceBuilder().createImportNamespaceForDirective(import); |
- Iterable<Element> visibleElements = namespace.definedNames.values; |
- if (visibleElements.contains(element)) { |
- return; |
- } |
- } |
- } |
- _assertTrue(false); |
- } |
- |
void _assertSameTypeParameter( |
TypeParameter node, TypeParameterElement element) { |
_assertSameType(node.bound, element.bound); |
@@ -1471,6 +1471,8 @@ class PoorMansIncrementalResolver { |
Token token = _scan(code); |
RecordingErrorListener errorListener = new RecordingErrorListener(); |
Parser parser = new Parser(_unitSource, errorListener); |
+ AnalysisOptions options = _unitElement.context.analysisOptions; |
+ parser.parseGenericMethods = options.enableGenericMethods; |
CompilationUnit unit = parser.parseCompilationUnit(token); |
_newParseErrors = errorListener.errors; |
return unit; |