OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/closure_break2_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__closure_break2_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 closure_break2_test = Object.create(null); |
| 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 12 closure_break2_test.ClosureBreak2 = class ClosureBreak2 extends core.Object { |
| 13 new(field) { |
| 14 this.field = field; |
| 15 } |
| 16 }; |
| 17 dart.setSignature(closure_break2_test.ClosureBreak2, { |
| 18 constructors: () => ({new: dart.definiteFunctionType(closure_break2_test.Clo
sureBreak2, [core.int])}) |
| 19 }); |
| 20 closure_break2_test.ClosureBreak2Test = class ClosureBreak2Test extends core.O
bject { |
| 21 static testMain() { |
| 22 let o1 = new closure_break2_test.ClosureBreak2(3); |
| 23 let newstr = "abcdefgh"; |
| 24 function foo() { |
| 25 o1.field = dart.notNull(o1.field) + 1; |
| 26 expect$.Expect.equals(8, newstr[dartx.length]); |
| 27 } |
| 28 dart.fn(foo, VoidTodynamic()); |
| 29 let loop = true; |
| 30 L: |
| 31 while (loop) { |
| 32 let newstr1 = "abcd"; |
| 33 expect$.Expect.equals(4, newstr1[dartx.length]); |
| 34 while (loop) { |
| 35 let newint = 0; |
| 36 expect$.Expect.equals(4, newstr1[dartx.length]); |
| 37 break L; |
| 38 } |
| 39 } |
| 40 foo(); |
| 41 expect$.Expect.equals(4, o1.field); |
| 42 } |
| 43 }; |
| 44 dart.setSignature(closure_break2_test.ClosureBreak2Test, { |
| 45 statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}), |
| 46 names: ['testMain'] |
| 47 }); |
| 48 closure_break2_test.main = function() { |
| 49 closure_break2_test.ClosureBreak2Test.testMain(); |
| 50 }; |
| 51 dart.fn(closure_break2_test.main, VoidTodynamic()); |
| 52 // Exports: |
| 53 exports.closure_break2_test = closure_break2_test; |
| 54 }); |
OLD | NEW |