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

Unified Diff: pkg/front_end/testcases/inference/parameter_defaults_upwards.dart.direct.expect

Issue 2915763008: Perform type inference on default values of optional/named parameters. (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/parameter_defaults_upwards.dart.direct.expect
diff --git a/pkg/front_end/testcases/inference/parameter_defaults_upwards.dart.direct.expect b/pkg/front_end/testcases/inference/parameter_defaults_upwards.dart.direct.expect
new file mode 100644
index 0000000000000000000000000000000000000000..e517d099894a052bda87a0ab8253ca67aa7f8433
--- /dev/null
+++ b/pkg/front_end/testcases/inference/parameter_defaults_upwards.dart.direct.expect
@@ -0,0 +1,22 @@
+library test;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object> extends core::Object {
+ constructor optional(([self::C::T]) → void func) → void
+ : super core::Object::•() {}
+ constructor named(({x: self::C::T}) → void func) → void
+ : super core::Object::•() {}
+}
+static method optional_toplevel([dynamic x = const <dynamic>[0]]) → void {}
+static method named_toplevel({dynamic x = const <dynamic>[0]}) → void {}
+static method main() → dynamic {
+ function optional_local([dynamic x = const <dynamic>[0]]) → void {}
+ function named_local({dynamic x = const <dynamic>[0]}) → void {}
+ dynamic c_optional_toplevel = new self::C::optional<dynamic>(self::optional_toplevel);
+ dynamic c_named_toplevel = new self::C::named<dynamic>(self::named_toplevel);
+ dynamic c_optional_local = new self::C::optional<dynamic>(optional_local);
+ dynamic c_named_local = new self::C::named<dynamic>(named_local);
+ dynamic c_optional_closure = new self::C::optional<dynamic>(([dynamic x = const <dynamic>[0]]) → dynamic {});
+ dynamic c_named_closure = new self::C::named<dynamic>(({dynamic x = const <dynamic>[0]}) → dynamic {});
+}

Powered by Google App Engine
This is Rietveld 408576698