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

Unified Diff: test/codegen/constructors.dart

Issue 1135543003: Fixes #178 (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Reformat Created 5 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
« no previous file with comments | « test/browser/runtime_tests.js ('k') | test/codegen/expect/constructors.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/constructors.dart
diff --git a/test/codegen/constructors.dart b/test/codegen/constructors.dart
index 092e219921b040a688599849856dda592b121f2d..a23465cb5456763ef37be0f21e381114a7871bd5 100644
--- a/test/codegen/constructors.dart
+++ b/test/codegen/constructors.dart
@@ -83,3 +83,26 @@ class P extends N {
P.foo(int x) : this(x + 42);
P.bar() : this.foo(1);
}
+
+class Q<T> {
+ T x;
+
+ Q(y) : x = y;
+
+ static Q foo() => new Q("hello");
+
+ String bar() {
+ var q = foo();
+ return q.x;
+ }
+
+ String bar2() {
+ var q = new Q("world");
+ return q.x;
+ }
+
+ static String baz() {
+ var q = new Q<int>(42);
+ return q.bar() + q.bar2();
+ }
+}
« no previous file with comments | « test/browser/runtime_tests.js ('k') | test/codegen/expect/constructors.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698