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

Unified Diff: test/codegen/expect/constructors.js

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/codegen/constructors.dart ('k') | test/codegen/expect/constructors.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/constructors.js
diff --git a/test/codegen/expect/constructors.js b/test/codegen/expect/constructors.js
index 14f6eebab32a1bf7001a8f08687b0339e5312546..8739065a04ec737721b37ea08781421a494c1579 100644
--- a/test/codegen/expect/constructors.js
+++ b/test/codegen/expect/constructors.js
@@ -100,6 +100,30 @@ var core = dart.import(core);
}
dart.defineNamedConstructor(P, 'foo');
dart.defineNamedConstructor(P, 'bar');
+ let Q$ = dart.generic(function(T) {
+ class Q extends core.Object {
+ Q(y) {
+ this.x = dart.as(y, T);
+ }
+ static foo() {
+ return new (Q$())("hello");
+ }
+ bar() {
+ let q = Q.foo();
+ return dart.as(q.x, core.String);
+ }
+ bar2() {
+ let q = new (Q$())("world");
+ return dart.as(q.x, core.String);
+ }
+ static baz() {
+ let q = new (Q$(core.int))(42);
+ return dart.notNull(q.bar()) + dart.notNull(q.bar2());
+ }
+ }
+ return Q;
+ });
+ let Q = Q$();
// Exports:
exports.A = A;
exports.B = B;
@@ -117,4 +141,6 @@ var core = dart.import(core);
exports.M = M;
exports.N = N;
exports.P = P;
+ exports.Q$ = Q$;
+ exports.Q = Q;
})(constructors, core);
« no previous file with comments | « test/codegen/constructors.dart ('k') | test/codegen/expect/constructors.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698