OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/side_effect_throw_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__side_effect_throw_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 side_effect_throw_test = Object.create(null); |
| 11 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da
rt.void, [])))(); |
| 12 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 13 side_effect_throw_test.B = class B extends core.Object { |
| 14 ['<<'](other) { |
| 15 side_effect_throw_test.B.x = other; |
| 16 return 33; |
| 17 } |
| 18 }; |
| 19 dart.setSignature(side_effect_throw_test.B, { |
| 20 methods: () => ({'<<': dart.definiteFunctionType(dart.dynamic, [dart.dynamic
])}) |
| 21 }); |
| 22 side_effect_throw_test.B.x = null; |
| 23 const _m = Symbol('_m'); |
| 24 side_effect_throw_test.A = class A extends core.Object { |
| 25 get [_m]() { |
| 26 return new side_effect_throw_test.B(); |
| 27 } |
| 28 opshl(n) { |
| 29 return dart.dsend(dart.dsend(this[_m], '<<', 499), '|', 2 - dart.notNull(c
ore.num._check(n))); |
| 30 } |
| 31 }; |
| 32 dart.setSignature(side_effect_throw_test.A, { |
| 33 methods: () => ({opshl: dart.definiteFunctionType(dart.dynamic, [dart.dynami
c])}) |
| 34 }); |
| 35 side_effect_throw_test.main = function() { |
| 36 let a = new side_effect_throw_test.A(); |
| 37 expect$.Expect.throws(dart.fn(() => a.opshl("string"), VoidTovoid())); |
| 38 expect$.Expect.equals(499, side_effect_throw_test.B.x); |
| 39 }; |
| 40 dart.fn(side_effect_throw_test.main, VoidTodynamic()); |
| 41 // Exports: |
| 42 exports.side_effect_throw_test = side_effect_throw_test; |
| 43 }); |
OLD | NEW |