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

Unified Diff: pkg/analyzer/lib/src/dart/element/type.dart

Issue 2621433003: fixes #28236, generic methods should not cause warnings in Dart 1 (Closed)
Patch Set: test type annotation fix Created 3 years, 11 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/generated/static_type_analyzer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/type.dart
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index 58932c67539f040f586fbae66425e1e7ab8c7e09..968c18fa1a85581e1382e38008800b7220269c93 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -833,11 +833,12 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType {
@override
bool isSubtypeOf(DartType type) {
+ var typeSystem = new TypeSystemImpl(null);
return relate(
- this,
- type,
+ typeSystem.instantiateToBounds(this),
+ typeSystem.instantiateToBounds(type),
(DartType t, DartType s, _, __) => t.isAssignableTo(s),
- new TypeSystemImpl(null).instantiateToBounds);
+ typeSystem.instantiateToBounds);
}
@override
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/static_type_analyzer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698