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

Unified Diff: pkg/fasta/test/classes.dart

Issue 2631613003: Add Fasta tests. (Closed)
Patch Set: Address review comments. Created 3 years, 11 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
« no previous file with comments | « pkg/fasta/test/casts.dart.outline.expect ('k') | pkg/fasta/test/classes.dart.direct.expect » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fasta/test/classes.dart
diff --git a/pkg/fasta/test/classes.dart b/pkg/fasta/test/classes.dart
new file mode 100644
index 0000000000000000000000000000000000000000..1536904ab4705443ed775558bcd0a0740f795cb5
--- /dev/null
+++ b/pkg/fasta/test/classes.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A {
+ final int x;
+ final int y;
+ A(this.y) : x = 42;
+ method() {
+ print("A.method x: $x y: $y");
+ print(this);
+ print(this.runtimeType);
+ }
+}
+
+class B extends A {
+ B(x) : super(x);
+ method() {
+ print("B.method x: $x y: $y");
+ super.method();
+ }
+}
+
+main() {
+ A a = new A(87);
+ B b = new B(117);
+ a.method();
+ b.method();
+}
« no previous file with comments | « pkg/fasta/test/casts.dart.outline.expect ('k') | pkg/fasta/test/classes.dart.direct.expect » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698