| Index: pkg/analyzer/lib/src/task/strong/checker.dart
|
| diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
|
| index cf6b2f1ae8635123209e5307312d15fac116bdb6..3e6f6f52196978450f264947e8b879ab49b9179a 100644
|
| --- a/pkg/analyzer/lib/src/task/strong/checker.dart
|
| +++ b/pkg/analyzer/lib/src/task/strong/checker.dart
|
| @@ -325,9 +325,7 @@ class CodeChecker extends RecursiveAstVisitor {
|
|
|
| @override
|
| void visitForEachStatement(ForEachStatement node) {
|
| - var loopVariable = node.identifier != null
|
| - ? node.identifier
|
| - : node.loopVariable?.identifier;
|
| + var loopVariable = node.identifier ?? node.loopVariable?.identifier;
|
|
|
| // Safely handle malformed statements.
|
| if (loopVariable != null) {
|
| @@ -1134,8 +1132,7 @@ class _OverrideChecker {
|
|
|
| // Check overrides from its mixins
|
| for (int i = 0; i < type.mixins.length; i++) {
|
| - var loc =
|
| - errorLocation != null ? errorLocation : node.withClause.mixinTypes[i];
|
| + var loc = errorLocation ?? node.withClause.mixinTypes[i];
|
| for (var interfaceType in interfaces) {
|
| // We copy [seen] so we can report separately if more than one mixin or
|
| // the base class have an invalid override.
|
| @@ -1147,8 +1144,10 @@ class _OverrideChecker {
|
| // Check overrides from its superclasses
|
| if (includeParents) {
|
| var parent = type.superclass;
|
| - if (parent.isObject) return;
|
| - var loc = errorLocation != null ? errorLocation : node.extendsClause;
|
| + if (parent.isObject) {
|
| + return;
|
| + }
|
| + var loc = errorLocation ?? node.extendsClause;
|
| // No need to copy [seen] here because we made copies above when reporting
|
| // errors on mixins.
|
| _checkInterfacesOverrides(parent, interfaces, seen,
|
|
|