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

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

Issue 2336503003: fix #25578, implement @covariant parameter overrides (Closed)
Patch Set: fix for summaries, thanks Paul! Created 4 years, 3 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 717ef2ad6defb872ebb81583d30b6426aa750be3..010833e30374c4f1edc65c8c0e87349d3c766386 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -5038,10 +5038,10 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
FunctionType requiredMemberFT = _inheritanceManager
.substituteTypeArgumentsInMemberFromInheritance(
requiredMemberType, memberName, enclosingType);
- foundConcreteFT =
- _typeSystem.typeToConcreteType(_typeProvider, foundConcreteFT);
- requiredMemberFT =
- _typeSystem.typeToConcreteType(_typeProvider, requiredMemberFT);
+ foundConcreteFT = _typeSystem.functionTypeToConcreteType(
+ _typeProvider, foundConcreteFT);
+ requiredMemberFT = _typeSystem.functionTypeToConcreteType(
+ _typeProvider, requiredMemberFT);
if (_typeSystem.isSubtypeOf(foundConcreteFT, requiredMemberFT)) {
continue;
}
@@ -6229,9 +6229,9 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
bool _expressionIsAssignableAtType(Expression expression,
DartType actualStaticType, DartType expectedStaticType) {
bool concrete = _options.strongMode && checker.isKnownFunction(expression);
- if (concrete) {
- actualStaticType =
- _typeSystem.typeToConcreteType(_typeProvider, actualStaticType);
+ if (concrete && actualStaticType is FunctionType) {
+ actualStaticType = _typeSystem.functionTypeToConcreteType(
+ _typeProvider, actualStaticType);
// TODO(leafp): Move the Downcast functionality here.
// TODO(leafp): Support strict downcasts
Leaf 2016/09/12 23:42:37 At least the second of these TODOs is dead, you've
Jennifer Messerly 2016/09/13 00:16:21 Good catch, done!
}

Powered by Google App Engine
This is Rietveld 408576698