OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/issue10783_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__issue10783_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 issue10783_test = Object.create(null); |
| 12 let JSArrayOfObject = () => (JSArrayOfObject = dart.constFn(_interceptors.JSAr
ray$(core.Object)))(); |
| 13 let ListOfObject = () => (ListOfObject = dart.constFn(core.List$(core.Object))
)(); |
| 14 let JSArrayOfListOfObject = () => (JSArrayOfListOfObject = dart.constFn(_inter
ceptors.JSArray$(ListOfObject())))(); |
| 15 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da
rt.void, [])))(); |
| 16 let dynamicTobool = () => (dynamicTobool = dart.constFn(dart.definiteFunctionT
ype(core.bool, [dart.dynamic])))(); |
| 17 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 18 issue10783_test.C = class C extends core.Object { |
| 19 foo(y) { |
| 20 return y; |
| 21 } |
| 22 }; |
| 23 dart.setSignature(issue10783_test.C, { |
| 24 methods: () => ({foo: dart.definiteFunctionType(dart.dynamic, [core.int])}) |
| 25 }); |
| 26 issue10783_test.main = function() { |
| 27 for (let b of JSArrayOfListOfObject().of([JSArrayOfObject().of([false, 'pig'
])])) { |
| 28 let c = null; |
| 29 if (dart.test(b[dartx.get](0))) c = new issue10783_test.C(); |
| 30 expect$.Expect.throws(dart.fn(() => core.print(dart.dsend(c, 'foo', b[dart
x.get](1))), VoidTovoid()), dart.fn(e => core.NoSuchMethodError.is(e), dynamicTo
bool())); |
| 31 } |
| 32 }; |
| 33 dart.fn(issue10783_test.main, VoidTodynamic()); |
| 34 // Exports: |
| 35 exports.issue10783_test = issue10783_test; |
| 36 }); |
OLD | NEW |