OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/call_nonexistent_constructor_test_none_multi', nu
ll, /* Imports */[ |
| 2 'dart_sdk' |
| 3 ], function load__call_nonexistent_constructor_test_none_multi(exports, dart_sdk
) { |
| 4 'use strict'; |
| 5 const core = dart_sdk.core; |
| 6 const dart = dart_sdk.dart; |
| 7 const dartx = dart_sdk.dartx; |
| 8 const call_nonexistent_constructor_test_none_multi = Object.create(null); |
| 9 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 10 call_nonexistent_constructor_test_none_multi.foo = function() { |
| 11 dart.throw('hest'); |
| 12 }; |
| 13 dart.fn(call_nonexistent_constructor_test_none_multi.foo, VoidTodynamic()); |
| 14 call_nonexistent_constructor_test_none_multi.A = class A extends core.Object { |
| 15 foo(x) { |
| 16 } |
| 17 }; |
| 18 dart.defineNamedConstructor(call_nonexistent_constructor_test_none_multi.A, 'f
oo'); |
| 19 dart.setSignature(call_nonexistent_constructor_test_none_multi.A, { |
| 20 constructors: () => ({foo: dart.definiteFunctionType(call_nonexistent_constr
uctor_test_none_multi.A, [dart.dynamic])}) |
| 21 }); |
| 22 call_nonexistent_constructor_test_none_multi.main = function() { |
| 23 let i = 0; |
| 24 new call_nonexistent_constructor_test_none_multi.A.foo(42); |
| 25 try { |
| 26 } catch (e$) { |
| 27 if (core.NoSuchMethodError.is(e$)) { |
| 28 let e = e$; |
| 29 i = -1; |
| 30 } else if (core.String.is(e$)) { |
| 31 let e = e$; |
| 32 i = 1; |
| 33 } else |
| 34 throw e$; |
| 35 } |
| 36 |
| 37 try { |
| 38 } catch (e) { |
| 39 if (core.NoSuchMethodError.is(e)) { |
| 40 i = 2; |
| 41 } else |
| 42 throw e; |
| 43 } |
| 44 |
| 45 }; |
| 46 dart.fn(call_nonexistent_constructor_test_none_multi.main, VoidTodynamic()); |
| 47 // Exports: |
| 48 exports.call_nonexistent_constructor_test_none_multi = call_nonexistent_constr
uctor_test_none_multi; |
| 49 }); |
OLD | NEW |