OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/regress_23500_test_01_multi', null, /* Imports */
[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__regress_23500_test_01_multi(exports, dart_sdk, expect) { |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const async = dart_sdk.async; |
| 8 const dart = dart_sdk.dart; |
| 9 const dartx = dart_sdk.dartx; |
| 10 const expect$ = expect.expect; |
| 11 const regress_23500_test_01_multi = Object.create(null); |
| 12 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 13 regress_23500_test_01_multi.foo = function() { |
| 14 return dart.async(function*() { |
| 15 try { |
| 16 try { |
| 17 let it = async.StreamIterator.new(async.Stream.fromIterable([])); |
| 18 try { |
| 19 while (yield it.moveNext()) { |
| 20 let c = it.current; |
| 21 } |
| 22 } finally { |
| 23 yield it.cancel(); |
| 24 } |
| 25 } catch (error) { |
| 26 } |
| 27 |
| 28 } catch (error) { |
| 29 } |
| 30 |
| 31 dart.throw("error"); |
| 32 }, dart.dynamic); |
| 33 }; |
| 34 dart.fn(regress_23500_test_01_multi.foo, VoidTodynamic()); |
| 35 regress_23500_test_01_multi.main = function() { |
| 36 return dart.async(function*() { |
| 37 let error = "no error"; |
| 38 try { |
| 39 yield regress_23500_test_01_multi.foo(); |
| 40 } catch (e) { |
| 41 error = core.String._check(e); |
| 42 } |
| 43 |
| 44 expect$.Expect.equals("error", error); |
| 45 }, dart.dynamic); |
| 46 }; |
| 47 dart.fn(regress_23500_test_01_multi.main, VoidTodynamic()); |
| 48 // Exports: |
| 49 exports.regress_23500_test_01_multi = regress_23500_test_01_multi; |
| 50 }); |
OLD | NEW |