OLD | NEW |
1 //FAILED TO COMPILE | 1 dart_library.library('language/hello_script_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__hello_script_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 hello_script_test = Object.create(null); |
| 11 const hello_script_lib = Object.create(null); |
| 12 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 13 hello_script_test.main = function() { |
| 14 hello_script_lib.HelloLib.doTest(); |
| 15 expect$.Expect.equals(18, hello_script_lib.x); |
| 16 core.print("Hello done."); |
| 17 }; |
| 18 dart.fn(hello_script_test.main, VoidTodynamic()); |
| 19 hello_script_lib.HelloLib = class HelloLib extends core.Object { |
| 20 static doTest() { |
| 21 hello_script_lib.x = 17; |
| 22 expect$.Expect.equals(17, (() => { |
| 23 let x = hello_script_lib.x; |
| 24 hello_script_lib.x = dart.dsend(x, '+', 1); |
| 25 return x; |
| 26 })()); |
| 27 core.print("Hello from Lib!"); |
| 28 } |
| 29 }; |
| 30 dart.setSignature(hello_script_lib.HelloLib, { |
| 31 statics: () => ({doTest: dart.definiteFunctionType(dart.dynamic, [])}), |
| 32 names: ['doTest'] |
| 33 }); |
| 34 hello_script_lib.x = null; |
| 35 // Exports: |
| 36 exports.hello_script_test = hello_script_test; |
| 37 exports.hello_script_lib = hello_script_lib; |
| 38 }); |
OLD | NEW |