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

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

Issue 1700523002: fixes #24507, allow known functions to be treated as strict arrows (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/type_system.dart
diff --git a/pkg/analyzer/lib/src/generated/type_system.dart b/pkg/analyzer/lib/src/generated/type_system.dart
index 851a990b6e30b4c3ad4d465687bf3dbd87021b63..42ca0282b6d6391a474f9d4c2680f02be457a228 100644
--- a/pkg/analyzer/lib/src/generated/type_system.dart
+++ b/pkg/analyzer/lib/src/generated/type_system.dart
@@ -284,18 +284,15 @@ class StrongTypeSystemImpl implements TypeSystem {
/**
* Check that [f1] is a subtype of [f2].
*
- * [fuzzyArrows] indicates whether or not the f1 and f2 should be
- * treated as fuzzy arrow types (and hence dynamic parameters to f2 treated
- * as bottom).
+ * This will always assume function types use fuzzy arrows, in other words
+ * that dynamic parameters of f1 and f2 are treated as bottom.
*/
- bool _isFunctionSubtypeOf(FunctionType f1, FunctionType f2,
- {bool fuzzyArrows: true}) {
-
+ bool _isFunctionSubtypeOf(FunctionType f1, FunctionType f2) {
return FunctionTypeImpl.relate(
f1,
f2,
(DartType t1, DartType t2) =>
- _isSubtypeOf(t2, t1, null, dynamicIsBottom: fuzzyArrows),
+ _isSubtypeOf(t2, t1, null, dynamicIsBottom: true),
instantiateToBounds,
returnRelation: isSubtypeOf);
}
« 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