OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/null2_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__null2_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 null2_test = Object.create(null); |
| 11 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFun
ctionType(dart.dynamic, [dart.dynamic])))(); |
| 12 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 13 null2_test.confuse = function(x) { |
| 14 try { |
| 15 if (new core.DateTime.now().millisecondsSinceEpoch == 42) x = 42; |
| 16 dart.throw([x]); |
| 17 } catch (e) { |
| 18 if (dart.dynamic.is(e)) { |
| 19 return dart.dindex(e, 0); |
| 20 } else |
| 21 throw e; |
| 22 } |
| 23 |
| 24 return 42; |
| 25 }; |
| 26 dart.fn(null2_test.confuse, dynamicTodynamic()); |
| 27 null2_test.main = function() { |
| 28 expect$.Expect.equals("Null", dart.toString(dart.runtimeType(null))); |
| 29 expect$.Expect.equals("Null", dart.toString(dart.runtimeType(null2_test.conf
use(null)))); |
| 30 }; |
| 31 dart.fn(null2_test.main, VoidTodynamic()); |
| 32 // Exports: |
| 33 exports.null2_test = null2_test; |
| 34 }); |
OLD | NEW |