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

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

Issue 1138793002: Tag closures with their types (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: More comment fixes 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/expect/cascade.js ('k') | test/codegen/expect/covariance.js » ('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 f91ea5c502696eddc3a7fb0b8d8e5e9bf86de50c..305cbb6871f9082a959a4ab02a6ff346f89b8762 100644
--- a/test/codegen/expect/constructors.js
+++ b/test/codegen/expect/constructors.js
@@ -3,21 +3,25 @@ var core = dart.import(core);
(function(exports, core) {
'use strict';
class A extends core.Object {}
+ dart.setSignature(A, {});
class B extends core.Object {
B() {
}
}
+ dart.setSignature(B, {});
class C extends core.Object {
named() {
}
}
dart.defineNamedConstructor(C, 'named');
+ dart.setSignature(C, {});
class C2 extends C {
named() {
super.named();
}
}
dart.defineNamedConstructor(C2, 'named');
+ dart.setSignature(C2, {});
class D extends core.Object {
D() {
}
@@ -25,27 +29,32 @@ var core = dart.import(core);
}
}
dart.defineNamedConstructor(D, 'named');
+ dart.setSignature(D, {});
class E extends core.Object {
E(name) {
this.name = name;
}
}
+ dart.setSignature(E, {});
class F extends E {
F(name) {
super.E(name);
}
}
+ dart.setSignature(F, {});
class G extends core.Object {
G(p1) {
if (p1 === void 0)
p1 = null;
}
}
+ dart.setSignature(G, {});
class H extends core.Object {
H(opts) {
let p1 = opts && 'p1' in opts ? opts.p1 : null;
}
}
+ dart.setSignature(H, {});
class I extends core.Object {
I() {
this.name = 'default';
@@ -55,12 +64,14 @@ var core = dart.import(core);
}
}
dart.defineNamedConstructor(I, 'named');
+ dart.setSignature(I, {});
class J extends core.Object {
J() {
this.initialized = true;
this.nonInitialized = null;
}
}
+ dart.setSignature(J, {});
class K extends core.Object {
K() {
this.s = 'a';
@@ -70,23 +81,27 @@ var core = dart.import(core);
}
}
dart.defineNamedConstructor(K, 'withS');
+ dart.setSignature(K, {});
class L extends core.Object {
L(foo) {
this.foo = foo;
}
}
+ dart.setSignature(L, {});
class M extends L {
named(x) {
super.L(dart.notNull(x) + 42);
}
}
dart.defineNamedConstructor(M, 'named');
+ dart.setSignature(M, {});
class N extends M {
named(y) {
super.named(dart.notNull(y) + 100);
}
}
dart.defineNamedConstructor(N, 'named');
+ dart.setSignature(N, {});
class P extends N {
P(z) {
super.named(dart.notNull(z) + 9000);
@@ -100,6 +115,7 @@ var core = dart.import(core);
}
dart.defineNamedConstructor(P, 'foo');
dart.defineNamedConstructor(P, 'bar');
+ dart.setSignature(P, {});
let Q$ = dart.generic(function(T) {
class Q extends core.Object {
Q(y) {
@@ -121,6 +137,17 @@ var core = dart.import(core);
return dart.notNull(q.bar()) + dart.notNull(q.bar2());
}
}
+ dart.setSignature(Q, {
+ methods: () => ({
+ bar: dart.functionType(core.String, []),
+ bar2: dart.functionType(core.String, [])
+ }),
+ statics: () => ({
+ foo: dart.functionType(Q$(), []),
+ baz: dart.functionType(core.String, [])
+ }),
+ names: ['foo', 'baz']
+ });
return Q;
});
let Q = Q$();
« no previous file with comments | « test/codegen/expect/cascade.js ('k') | test/codegen/expect/covariance.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698