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

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

Issue 1405143006: improve static type analysis for `await for` (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
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 ec9559a0fee3b5cf31e84c344daf6d4ebb463e76..e1c8e11fb4ee511b3dae29e07ea27f9ddaaf1461 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -1312,13 +1312,8 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
isGetter = accessorElement.isGetter;
isSetter = accessorElement.isSetter;
}
- String executableElementName = executableElement.name;
FunctionType overridingFT = executableElement.type;
FunctionType overriddenFT = overriddenExecutable.type;
- InterfaceType enclosingType = _enclosingClass.type;
- overriddenFT = _inheritanceManager
- .substituteTypeArgumentsInMemberFromInheritance(
- overriddenFT, executableElementName, enclosingType);
if (overridingFT == null || overriddenFT == null) {
return false;
}
@@ -4483,15 +4478,7 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
// method, so skip it.
if ((elt is MethodElement && !elt.isAbstract) ||
(elt is PropertyAccessorElement && !elt.isAbstract)) {
- // Since we are comparing two function types, we need to do the
- // appropriate type substitutions first ().
- FunctionType foundConcreteFT = _inheritanceManager
- .substituteTypeArgumentsInMemberFromInheritance(
- concreteType, memberName, enclosingType);
- FunctionType requiredMemberFT = _inheritanceManager
- .substituteTypeArgumentsInMemberFromInheritance(
- requiredMemberType, memberName, enclosingType);
- if (_typeSystem.isSubtypeOf(foundConcreteFT, requiredMemberFT)) {
+ if (_typeSystem.isSubtypeOf(concreteType, requiredMemberType)) {
continue;
}
}

Powered by Google App Engine
This is Rietveld 408576698