| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analyzer.src.generated.error_verifier; | 5 library analyzer.src.generated.error_verifier; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import "dart:math" as math; | 8 import "dart:math" as math; |
| 9 | 9 |
| 10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 5023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5034 FunctionType foundConcreteFT = _inheritanceManager | 5034 FunctionType foundConcreteFT = _inheritanceManager |
| 5035 .substituteTypeArgumentsInMemberFromInheritance( | 5035 .substituteTypeArgumentsInMemberFromInheritance( |
| 5036 concreteType, memberName, enclosingType); | 5036 concreteType, memberName, enclosingType); |
| 5037 FunctionType requiredMemberFT = _inheritanceManager | 5037 FunctionType requiredMemberFT = _inheritanceManager |
| 5038 .substituteTypeArgumentsInMemberFromInheritance( | 5038 .substituteTypeArgumentsInMemberFromInheritance( |
| 5039 requiredMemberType, memberName, enclosingType); | 5039 requiredMemberType, memberName, enclosingType); |
| 5040 foundConcreteFT = _typeSystem.functionTypeToConcreteType( | 5040 foundConcreteFT = _typeSystem.functionTypeToConcreteType( |
| 5041 _typeProvider, foundConcreteFT); | 5041 _typeProvider, foundConcreteFT); |
| 5042 requiredMemberFT = _typeSystem.functionTypeToConcreteType( | 5042 requiredMemberFT = _typeSystem.functionTypeToConcreteType( |
| 5043 _typeProvider, requiredMemberFT); | 5043 _typeProvider, requiredMemberFT); |
| 5044 if (_typeSystem.isSubtypeOf(foundConcreteFT, requiredMemberFT)) { | 5044 |
| 5045 // Strong mode does override checking for types in CodeChecker, so |
| 5046 // we can skip it here. Doing it here leads to unnecessary duplicate |
| 5047 // error messages in subclasses that inherit from one that has an |
| 5048 // override error. |
| 5049 // |
| 5050 // See: https://github.com/dart-lang/sdk/issues/25232 |
| 5051 if (_options.strongMode || |
| 5052 _typeSystem.isSubtypeOf(foundConcreteFT, requiredMemberFT)) { |
| 5045 continue; | 5053 continue; |
| 5046 } | 5054 } |
| 5047 } | 5055 } |
| 5048 } | 5056 } |
| 5049 // The not qualifying concrete executable element was found, add it to the | 5057 // The not qualifying concrete executable element was found, add it to the |
| 5050 // list. | 5058 // list. |
| 5051 missingOverrides.add(executableElt); | 5059 missingOverrides.add(executableElt); |
| 5052 } | 5060 } |
| 5053 // Now that we have the set of missing overrides, generate a warning on this | 5061 // Now that we have the set of missing overrides, generate a warning on this |
| 5054 // class. | 5062 // class. |
| (...skipping 1838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6893 class _InvocationCollector extends RecursiveAstVisitor { | 6901 class _InvocationCollector extends RecursiveAstVisitor { |
| 6894 final List<String> superCalls = <String>[]; | 6902 final List<String> superCalls = <String>[]; |
| 6895 | 6903 |
| 6896 @override | 6904 @override |
| 6897 visitMethodInvocation(MethodInvocation node) { | 6905 visitMethodInvocation(MethodInvocation node) { |
| 6898 if (node.target is SuperExpression) { | 6906 if (node.target is SuperExpression) { |
| 6899 superCalls.add(node.methodName.name); | 6907 superCalls.add(node.methodName.name); |
| 6900 } | 6908 } |
| 6901 } | 6909 } |
| 6902 } | 6910 } |
| OLD | NEW |