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

Unified Diff: pkg/kernel/testcases/closures/contexts_in_field_initializers.dart

Issue 2995083002: [kernel] Fix bug with redirecting constructors in closure conversion. (Closed)
Patch Set: Created 3 years, 4 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/kernel/testcases/closures/contexts_in_field_initializers.dart
diff --git a/pkg/kernel/testcases/closures/contexts_in_field_initializers.dart b/pkg/kernel/testcases/closures/contexts_in_field_initializers.dart
index 0be4a67f58fb604f86c809f5a92da9a2302a5398..36fc5c13fa4a12faef76b09dcf38e27ab69a1c4a 100644
--- a/pkg/kernel/testcases/closures/contexts_in_field_initializers.dart
+++ b/pkg/kernel/testcases/closures/contexts_in_field_initializers.dart
@@ -14,6 +14,18 @@ class A {
A(this.x) {}
}
+class B {
+ X x;
+ B(X x) : x = x {
+ fn() {
+ print(x);
+ }
+
+ fn();
+ }
+}
+
main() {
A a = new A(new X());
+ B b = new B(new X());
}

Powered by Google App Engine
This is Rietveld 408576698