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

Unified Diff: pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart

Issue 2921583002: Fix a corner case of function type inference. (Closed)
Patch Set: Created 3 years, 7 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/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart
diff --git a/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart b/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart
index d8699ea4c4993df624ec8457a2d8ad3ed953dd59..27b6645ab79534e35b968ad69c3707eb80ca6870 100644
--- a/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart
+++ b/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart
@@ -8,7 +8,7 @@ library test;
var /*@topType=dynamic*/ h = null;
void foo(int f(Object _)) {}
-main() {
+test() {
var /*@type=(Object) -> dynamic*/ f = /*@returnType=dynamic*/ (Object x) =>
null;
String y = /*info:DYNAMIC_CAST*/ f(42);
@@ -26,3 +26,5 @@ main() {
foo(/*@returnType=<BottomType>*/ (/*@type=Object*/ x) =>
throw "not implemented");
}
+
+main() {}

Powered by Google App Engine
This is Rietveld 408576698