OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/throwing_lazy_variable_test', null, /* Imports */
[ |
| 2 'dart_sdk' |
| 3 ], function load__throwing_lazy_variable_test(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 throwing_lazy_variable_test = Object.create(null); |
| 9 let VoidToint = () => (VoidToint = dart.constFn(dart.definiteFunctionType(core
.int, [])))(); |
| 10 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 11 dart.defineLazy(throwing_lazy_variable_test, { |
| 12 get a() { |
| 13 return throwing_lazy_variable_test.foo(); |
| 14 }, |
| 15 set a(_) {} |
| 16 }); |
| 17 throwing_lazy_variable_test.foo = function() { |
| 18 dart.fn(() => 42, VoidToint()); |
| 19 if (true) dart.throw('Sorry'); |
| 20 return 42; |
| 21 }; |
| 22 dart.fn(throwing_lazy_variable_test.foo, VoidTodynamic()); |
| 23 throwing_lazy_variable_test.main = function() { |
| 24 try { |
| 25 throwing_lazy_variable_test.a; |
| 26 } catch (e) { |
| 27 } |
| 28 |
| 29 if (typeof throwing_lazy_variable_test.a == 'number') dart.throw('Test faile
d'); |
| 30 }; |
| 31 dart.fn(throwing_lazy_variable_test.main, VoidTodynamic()); |
| 32 // Exports: |
| 33 exports.throwing_lazy_variable_test = throwing_lazy_variable_test; |
| 34 }); |
OLD | NEW |