OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/inference_super_constructor_call_test', null, /*
Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__inference_super_constructor_call_test(exports, dart_sdk, expec
t) { |
| 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 inference_super_constructor_call_test = Object.create(null); |
| 11 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da
rt.void, [])))(); |
| 12 let dynamicTobool = () => (dynamicTobool = dart.constFn(dart.definiteFunctionT
ype(core.bool, [dart.dynamic])))(); |
| 13 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 14 inference_super_constructor_call_test.A = class A extends core.Object { |
| 15 full(field) { |
| 16 this.field = field; |
| 17 } |
| 18 }; |
| 19 dart.defineNamedConstructor(inference_super_constructor_call_test.A, 'full'); |
| 20 dart.setSignature(inference_super_constructor_call_test.A, { |
| 21 constructors: () => ({full: dart.definiteFunctionType(inference_super_constr
uctor_call_test.A, [dart.dynamic])}) |
| 22 }); |
| 23 inference_super_constructor_call_test.B = class B extends inference_super_cons
tructor_call_test.A { |
| 24 full(field) { |
| 25 super.full(field); |
| 26 } |
| 27 }; |
| 28 dart.defineNamedConstructor(inference_super_constructor_call_test.B, 'full'); |
| 29 dart.setSignature(inference_super_constructor_call_test.B, { |
| 30 constructors: () => ({full: dart.definiteFunctionType(inference_super_constr
uctor_call_test.B, [dart.dynamic])}) |
| 31 }); |
| 32 inference_super_constructor_call_test.main = function() { |
| 33 expect$.Expect.equals(84, dart.dsend(new inference_super_constructor_call_te
st.A.full(42).field, '+', 42)); |
| 34 expect$.Expect.throws(dart.fn(() => dart.dsend(new inference_super_construct
or_call_test.B.full(null).field, '+', 42), VoidTovoid()), dart.fn(e => core.NoSu
chMethodError.is(e), dynamicTobool())); |
| 35 }; |
| 36 dart.fn(inference_super_constructor_call_test.main, VoidTodynamic()); |
| 37 // Exports: |
| 38 exports.inference_super_constructor_call_test = inference_super_constructor_ca
ll_test; |
| 39 }); |
OLD | NEW |