OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/mixin_issue10216_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__mixin_issue10216_test(exports, dart_sdk, expect) { |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const _interceptors = dart_sdk._interceptors; |
| 8 const dart = dart_sdk.dart; |
| 9 const dartx = dart_sdk.dartx; |
| 10 const expect$ = expect.expect; |
| 11 const mixin_issue10216_test = Object.create(null); |
| 12 let JSArrayOfA = () => (JSArrayOfA = dart.constFn(_interceptors.JSArray$(mixin
_issue10216_test.A)))(); |
| 13 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 14 mixin_issue10216_test.A = class A extends core.Object { |
| 15 foo(x, y) { |
| 16 if (y === void 0) y = null; |
| 17 return dart.str`${x};${y}`; |
| 18 } |
| 19 }; |
| 20 dart.setSignature(mixin_issue10216_test.A, { |
| 21 methods: () => ({foo: dart.definiteFunctionType(dart.dynamic, [dart.dynamic]
, [dart.dynamic])}) |
| 22 }); |
| 23 mixin_issue10216_test.M1 = class M1 extends core.Object {}; |
| 24 mixin_issue10216_test.M2 = class M2 extends core.Object { |
| 25 plain(x) { |
| 26 return dart.str`P ${x}`; |
| 27 } |
| 28 bar(x, y) { |
| 29 if (y === void 0) y = null; |
| 30 return dart.str`${y},${x}`; |
| 31 } |
| 32 }; |
| 33 dart.setSignature(mixin_issue10216_test.M2, { |
| 34 methods: () => ({ |
| 35 plain: dart.definiteFunctionType(dart.dynamic, [dart.dynamic]), |
| 36 bar: dart.definiteFunctionType(dart.dynamic, [dart.dynamic], [dart.dynamic
]) |
| 37 }) |
| 38 }); |
| 39 mixin_issue10216_test.M3 = class M3 extends core.Object {}; |
| 40 mixin_issue10216_test.B = class B extends dart.mixin(mixin_issue10216_test.A,
mixin_issue10216_test.M1, mixin_issue10216_test.M2, mixin_issue10216_test.M3) {}
; |
| 41 mixin_issue10216_test.makeB = function() { |
| 42 return mixin_issue10216_test.B.as(JSArrayOfA().of([new mixin_issue10216_test
.A(), new mixin_issue10216_test.B()])[dartx.last]); |
| 43 }; |
| 44 dart.fn(mixin_issue10216_test.makeB, VoidTodynamic()); |
| 45 mixin_issue10216_test.main = function() { |
| 46 let b = mixin_issue10216_test.makeB(); |
| 47 expect$.Expect.equals('1;2', dart.dsend(b, 'foo', 1, 2)); |
| 48 expect$.Expect.equals('2;null', dart.dsend(b, 'foo', 2)); |
| 49 expect$.Expect.equals('P 3', dart.dsend(b, 'plain', 3)); |
| 50 expect$.Expect.equals('100,4', dart.dsend(b, 'bar', 4, 100)); |
| 51 expect$.Expect.equals('null,5', dart.dsend(b, 'bar', 5)); |
| 52 }; |
| 53 dart.fn(mixin_issue10216_test.main, VoidTodynamic()); |
| 54 // Exports: |
| 55 exports.mixin_issue10216_test = mixin_issue10216_test; |
| 56 }); |
OLD | NEW |