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

Unified Diff: pkg/kernel/testcases/interpreter/object_super_test.dart

Issue 2990943002: Add support for super initialziers in constructor initializer list (Closed)
Patch Set: Add comment for index starting at 0 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/interpreter/object_super_test.dart
diff --git a/pkg/kernel/testcases/interpreter/object_super_test.dart b/pkg/kernel/testcases/interpreter/object_super_test.dart
index 67d0e9da44ec4088a8023f34cbc50dffac6d25cb..94c8f044b941a23a86dcb7f7eec00ee22bd390ef 100644
--- a/pkg/kernel/testcases/interpreter/object_super_test.dart
+++ b/pkg/kernel/testcases/interpreter/object_super_test.dart
@@ -6,29 +6,25 @@ library object_super_test;
/// Simple program creating an object with super constructor invocation.
void main() {
+ print("Create A instance");
var a = new A.withArgs(0);
print(a.foo);
+ print("Create B instance");
var b1 = new B.withSuper();
print(b1.foo);
print(b1.bar);
-
- var b2 = new B();
- print(b2.foo);
- print(b2.bar);
}
class A {
String foo;
- A() : this.withArgs(0);
A.withArgs(int i) : foo = fieldInitializer(i, 'A.foo');
}
class B extends A {
String bar;
- B();
B.withSuper()
: bar = fieldInitializer(0, 'B.bar'),
super.withArgs(1);
« no previous file with comments | « pkg/kernel/test/interpreter/interpreter.status ('k') | pkg/kernel/testcases/interpreter/object_super_test.dart.expect » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698