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

Unified Diff: pkg/analyzer/lib/src/task/strong/rules.dart

Issue 1497803003: Check for void in rules subtyping (fixes #25069) (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/test/generated/type_system_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/strong/rules.dart
diff --git a/pkg/analyzer/lib/src/task/strong/rules.dart b/pkg/analyzer/lib/src/task/strong/rules.dart
index ed92a7ecc5a7289ca30b978b3e94fcd1c66eef1e..909a6fb0548cc1bc719deef84fd7ef67508314e2 100644
--- a/pkg/analyzer/lib/src/task/strong/rules.dart
+++ b/pkg/analyzer/lib/src/task/strong/rules.dart
@@ -321,6 +321,10 @@ class TypeRules {
return false;
}
+ if (t1.isVoid || t2.isVoid) {
+ return false;
+ }
+
if (t2.isDartCoreFunction) {
if (t1 is FunctionType) return true;
if (t1.element is ClassElement) {
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/type_system_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698