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

Unified Diff: pkg/analyzer/test/src/task/strong/checker_test.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 | « pkg/analyzer/test/generated/type_system_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/strong/checker_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index dc4b9c44121d99c11f5f753a1e3f1056286d6d5a..781a91d1702c0fa13f8510db33b02ea4e987a59b 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -276,6 +276,17 @@ void main() {
'''
});
+ // Regression test for https://github.com/dart-lang/sdk/issues/25069
+ testChecker('Void subtyping', {
+ '/main.dart': '''
+ typedef int Foo();
+ void foo() {}
+ void main () {
+ Foo x = /*severe:StaticTypeError*/foo();
+ }
+ '''
+ });
+
testChecker('Ground type subtyping: dynamic is top', {
'/main.dart': '''
« no previous file with comments | « pkg/analyzer/test/generated/type_system_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698