Index: pkg/analyzer/lib/src/task/dart.dart |
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart |
index 13e7b89620c4ff97579f37ebd22240d46fe09525..4ddfee51c4792a9fb3c93e8d0ec245ca95fb8b85 100644 |
--- a/pkg/analyzer/lib/src/task/dart.dart |
+++ b/pkg/analyzer/lib/src/task/dart.dart |
@@ -2669,12 +2669,12 @@ class DartDelta extends Delta { |
// We could just invalidate errors if we moved reporting of |
// HintCode.DEPRECATED_MEMBER_USE from resolver to verifier. |
for (String name in references.names) { |
- ClassElementDelta classDelta = changedClasses[name]; |
- if (classDelta != null && classDelta.hasAnnotationChanges) { |
- _log(() => '$refLibrary is affected because ' |
- '$name has a class delta with annotation changes'); |
- return true; |
- } |
+ ClassElementDelta classDelta = changedClasses[name]; |
+ if (classDelta != null && classDelta.hasAnnotationChanges) { |
+ _log(() => '$refLibrary is affected because ' |
+ '$name has a class delta with annotation changes'); |
+ return true; |
+ } |
} |
return false; |
} |
@@ -4895,16 +4895,6 @@ class ReferencedNamesBuilder extends GeneralizingAstVisitor { |
} |
} |
- static String _getSimpleName(Identifier identifier) { |
- if (identifier is SimpleIdentifier) { |
- return identifier.name; |
- } |
- if (identifier is PrefixedIdentifier) { |
- return identifier.identifier.name; |
- } |
- return null; |
- } |
- |
@override |
visitClassTypeAlias(ClassTypeAlias node) { |
ReferencedNamesScope outerScope = scope; |
@@ -4934,14 +4924,6 @@ class ReferencedNamesBuilder extends GeneralizingAstVisitor { |
} |
@override |
- visitSuperConstructorInvocation(SuperConstructorInvocation node) { |
- if (node.constructorName == null && enclosingSuperClassName != null) { |
- names.extendedUsedUnnamedConstructorNames.add(enclosingSuperClassName); |
- } |
- super.visitSuperConstructorInvocation(node); |
- } |
- |
- @override |
visitConstructorName(ConstructorName node) { |
if (node.parent is! ConstructorDeclaration) { |
super.visitConstructorName(node); |
@@ -5061,6 +5043,14 @@ class ReferencedNamesBuilder extends GeneralizingAstVisitor { |
} |
@override |
+ visitSuperConstructorInvocation(SuperConstructorInvocation node) { |
+ if (node.constructorName == null && enclosingSuperClassName != null) { |
+ names.extendedUsedUnnamedConstructorNames.add(enclosingSuperClassName); |
+ } |
+ super.visitSuperConstructorInvocation(node); |
+ } |
+ |
+ @override |
visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { |
VariableDeclarationList variableList = node.variables; |
// Prepare type dependencies. |
@@ -5092,6 +5082,16 @@ class ReferencedNamesBuilder extends GeneralizingAstVisitor { |
void _addSuperNames(String className, List<TypeName> types) { |
types?.forEach((type) => _addSuperName(className, type)); |
} |
+ |
+ static String _getSimpleName(Identifier identifier) { |
+ if (identifier is SimpleIdentifier) { |
+ return identifier.name; |
+ } |
+ if (identifier is PrefixedIdentifier) { |
+ return identifier.identifier.name; |
+ } |
+ return null; |
+ } |
} |
class ReferencedNamesScope { |
@@ -6145,6 +6145,8 @@ class ScanDartTask extends SourceBasedAnalysisTask { |
scanner.setSourceStart(fragment.line, fragment.column); |
scanner.preserveComments = context.analysisOptions.preserveComments; |
scanner.scanGenericMethodComments = context.analysisOptions.strongMode; |
+ scanner.scanLazyAssignmentOperators = |
+ context.analysisOptions.enableLazyAssignmentOperators; |
LineInfo lineInfo = new LineInfo(scanner.lineStarts); |
@@ -6160,6 +6162,8 @@ class ScanDartTask extends SourceBasedAnalysisTask { |
new Scanner(source, new CharSequenceReader(content), errorListener); |
scanner.preserveComments = context.analysisOptions.preserveComments; |
scanner.scanGenericMethodComments = context.analysisOptions.strongMode; |
+ scanner.scanLazyAssignmentOperators = |
+ context.analysisOptions.enableLazyAssignmentOperators; |
LineInfo lineInfo = new LineInfo(scanner.lineStarts); |