| Index: tests/compiler/dart2js/js_backend_cps_ir_constructor_test.dart
|
| diff --git a/tests/compiler/dart2js/js_backend_cps_ir_constructor_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_constructor_test.dart
|
| index 1e5f4bf9ff53a8df521f739e08193f8d3168c5d9..39aa301f44f257d73fc094bccd63c313eae5c1c4 100644
|
| --- a/tests/compiler/dart2js/js_backend_cps_ir_constructor_test.dart
|
| +++ b/tests/compiler/dart2js/js_backend_cps_ir_constructor_test.dart
|
| @@ -164,6 +164,54 @@ function() {
|
| v0.Bar$5$q$w$y$z("x", null, "w", "y", "z");
|
| return v0;
|
| }"""),
|
| + const TestEntry(r"""
|
| +class C<T> {
|
| + foo() => T;
|
| +}
|
| +main() {
|
| + print(new C<int>().foo());
|
| +}""", r"""
|
| +function() {
|
| + P.print(V.C$([P.$int]).foo$0());
|
| + return null;
|
| +}"""),
|
| + const TestEntry(r"""
|
| +class C<T> {
|
| + foo() => C;
|
| +}
|
| +main() {
|
| + print(new C<int>().foo());
|
| +}""", r"""
|
| +function() {
|
| + P.print(V.C$().foo$0());
|
| + return null;
|
| +}"""),
|
| + const TestEntry.forMethod('generative_constructor(C#)', r"""
|
| +class C<T> {
|
| + C() { print(T); }
|
| + foo() => print(T);
|
| +}
|
| +main() {
|
| + new C<int>();
|
| +}""",r"""
|
| +function(v0) {
|
| + var v1;
|
| + v1 = H.setRuntimeTypeInfo(new V.C(), v0);
|
| + v1.C$0();
|
| + return v1;
|
| +}"""),
|
| + const TestEntry.forMethod('generative_constructor(C#)', r"""
|
| +class C<T> {
|
| + var x;
|
| + C() : x = new D<T>();
|
| +}
|
| +class D<T> {
|
| + foo() => T;
|
| +}
|
| +main() {
|
| + print(new C<int>().x.foo());
|
| +}""", r"""
|
| +"""),
|
| ];
|
|
|
| void main() {
|
|
|