OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/mixin_forwarding_constructor1_test', null, /* Imp
orts */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__mixin_forwarding_constructor1_test(exports, dart_sdk, expect)
{ |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const dart = dart_sdk.dart; |
| 8 const dartx = dart_sdk.dartx; |
| 9 const expect$ = expect.expect; |
| 10 const mixin_forwarding_constructor1_test = Object.create(null); |
| 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 12 mixin_forwarding_constructor1_test.Mixin1 = class Mixin1 extends core.Object { |
| 13 new() { |
| 14 this.mixin1Field = 1; |
| 15 } |
| 16 }; |
| 17 mixin_forwarding_constructor1_test.Mixin2 = class Mixin2 extends core.Object { |
| 18 new() { |
| 19 this.mixin2Field = 2; |
| 20 } |
| 21 }; |
| 22 mixin_forwarding_constructor1_test.A = class A extends core.Object { |
| 23 new(foo) { |
| 24 this.superField = foo; |
| 25 } |
| 26 }; |
| 27 dart.setSignature(mixin_forwarding_constructor1_test.A, { |
| 28 constructors: () => ({new: dart.definiteFunctionType(mixin_forwarding_constr
uctor1_test.A, [dart.dynamic])}) |
| 29 }); |
| 30 mixin_forwarding_constructor1_test.B = class B extends dart.mixin(mixin_forwar
ding_constructor1_test.A, mixin_forwarding_constructor1_test.Mixin1, mixin_forwa
rding_constructor1_test.Mixin2) { |
| 31 new(unused) { |
| 32 this.field = 4; |
| 33 super.new(3); |
| 34 } |
| 35 }; |
| 36 dart.setSignature(mixin_forwarding_constructor1_test.B, { |
| 37 constructors: () => ({new: dart.definiteFunctionType(mixin_forwarding_constr
uctor1_test.B, [dart.dynamic])}) |
| 38 }); |
| 39 mixin_forwarding_constructor1_test.main = function() { |
| 40 let b = new mixin_forwarding_constructor1_test.B(null); |
| 41 expect$.Expect.equals(1, b.mixin1Field); |
| 42 expect$.Expect.equals(2, b.mixin2Field); |
| 43 expect$.Expect.equals(3, b.superField); |
| 44 expect$.Expect.equals(4, b.field); |
| 45 }; |
| 46 dart.fn(mixin_forwarding_constructor1_test.main, VoidTodynamic()); |
| 47 // Exports: |
| 48 exports.mixin_forwarding_constructor1_test = mixin_forwarding_constructor1_tes
t; |
| 49 }); |
OLD | NEW |