OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/private4_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__private4_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 private4_test = Object.create(null); |
| 11 const other_library = Object.create(null); |
| 12 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da
rt.void, [])))(); |
| 13 let dynamicTobool = () => (dynamicTobool = dart.constFn(dart.definiteFunctionT
ype(core.bool, [dart.dynamic])))(); |
| 14 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 15 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFun
ctionType(dart.dynamic, [dart.dynamic])))(); |
| 16 private4_test.main = function() { |
| 17 expect$.Expect.equals(42, other_library.foo(new other_library.A())); |
| 18 expect$.Expect.throws(dart.fn(() => other_library.foo(new private4_test.B())
, VoidTovoid()), dart.fn(e => core.NoSuchMethodError.is(e), dynamicTobool())); |
| 19 }; |
| 20 dart.fn(private4_test.main, VoidTodynamic()); |
| 21 const _bar = Symbol('_bar'); |
| 22 private4_test.B = class B extends core.Object { |
| 23 [_bar]() { |
| 24 return 42; |
| 25 } |
| 26 }; |
| 27 dart.setSignature(private4_test.B, { |
| 28 methods: () => ({[_bar]: dart.definiteFunctionType(dart.dynamic, [])}) |
| 29 }); |
| 30 const _bar$ = Symbol('_bar'); |
| 31 other_library.foo = function(a) { |
| 32 return dart.dsend(a, _bar$); |
| 33 }; |
| 34 dart.fn(other_library.foo, dynamicTodynamic()); |
| 35 other_library.A = class A extends core.Object { |
| 36 [_bar$]() { |
| 37 return 42; |
| 38 } |
| 39 }; |
| 40 dart.setSignature(other_library.A, { |
| 41 methods: () => ({[_bar$]: dart.definiteFunctionType(dart.dynamic, [])}) |
| 42 }); |
| 43 // Exports: |
| 44 exports.private4_test = private4_test; |
| 45 exports.other_library = other_library; |
| 46 }); |
OLD | NEW |