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

Unified Diff: pkg/front_end/testcases/inference/downwards_inference_on_function_expressions.dart.strong.expect

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/downwards_inference_on_function_expressions.dart.strong.expect
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_function_expressions.dart.strong.expect b/pkg/front_end/testcases/inference/downwards_inference_on_function_expressions.dart.strong.expect
new file mode 100644
index 0000000000000000000000000000000000000000..2835e1ca24be3dfaf46cfb181fcba47dcb243d6d
--- /dev/null
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_function_expressions.dart.strong.expect
@@ -0,0 +1,43 @@
+library test;
+import self as self;
+import "dart:core" as core;
+
+typedef Function2 = <S extends core::Object, T extends core::Object>(S) → T;
+static method main() → void {
+ {
+ (core::int) → core::String l0 = (core::int x) → core::String => null;
+ (core::int) → core::String l1 = (core::int x) → core::String => "hello";
+ (core::int) → core::String l2 = (core::String x) → core::String => "hello";
+ (core::int) → core::String l3 = (core::int x) → core::int => 3;
+ (core::int) → core::String l4 = (core::int x) → core::String {
+ return 3;
+ };
+ }
+ {
+ (core::int) → core::String l0 = (core::int x) → core::String => null;
+ (core::int) → core::String l1 = (core::int x) → core::String => "hello";
+ (core::int) → core::String l2 = (core::int x) → core::int => 3;
+ (core::int) → core::String l3 = (core::int x) → core::String {
+ return 3;
+ };
+ (core::int) → core::String l4 = (core::int x) → core::String {
+ return x;
+ };
+ }
+ {
+ (core::int) → core::List<core::String> l0 = (core::int x) → core::List<core::String> => null;
+ (core::int) → core::List<core::String> l1 = (core::int x) → core::List<core::String> => <core::String>["hello"];
+ (core::int) → core::List<core::String> l2 = (core::String x) → core::List<core::String> => <core::String>["hello"];
+ (core::int) → core::List<core::String> l3 = (core::int x) → core::List<core::String> => <core::String>[3];
+ (core::int) → core::List<core::String> l4 = (core::int x) → core::List<core::String> {
+ return <core::String>[3];
+ };
+ }
+ {
+ (core::int) → core::int l0 = (core::int x) → core::int => x;
+ (core::int) → core::int l1 = (core::int x) → core::int => x.{core::num::+}(1);
+ (core::int) → core::String l2 = (core::int x) → core::int => x;
+ (core::int) → core::String l3 = (core::int x) → core::String => x.substring(3);
+ (core::String) → core::String l4 = (core::String x) → core::String => x.{core::String::substring}(3);
+ }
+}
« no previous file with comments | « pkg/front_end/test/fasta/strong.status ('k') | pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698