Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1471)

Unified Diff: pkg/analyzer/lib/src/generated/error_verifier.dart

Issue 1921823007: Make types concrete when checking overrides. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/strong/checker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/error_verifier.dart
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index c99057ad123a0ffe0645274036a38d55461dfbe9..90392b78feccd14fb920e6cef7e9113567bb13c2 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -1404,7 +1404,7 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
// an error message once it's ready to "return false".
if (!overridingFT.typeFormals.isEmpty) {
if (overriddenFT.typeFormals.isEmpty) {
- overriddenFT = _typeSystem.instantiateToBounds(overriddenFT);
+ overridingFT = _typeSystem.instantiateToBounds(overridingFT);
} else {
List<TypeParameterElement> params1 = overridingFT.typeFormals;
List<TypeParameterElement> params2 = overriddenFT.typeFormals;
@@ -4571,6 +4571,10 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
FunctionType requiredMemberFT = _inheritanceManager
.substituteTypeArgumentsInMemberFromInheritance(
requiredMemberType, memberName, enclosingType);
+ foundConcreteFT =
+ _typeSystem.typeToConcreteType(_typeProvider, foundConcreteFT);
+ requiredMemberFT =
+ _typeSystem.typeToConcreteType(_typeProvider, requiredMemberFT);
if (_typeSystem.isSubtypeOf(foundConcreteFT, requiredMemberFT)) {
continue;
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/strong/checker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698