OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/final_syntax_test_01_multi', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__final_syntax_test_01_multi(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 final_syntax_test_01_multi = Object.create(null); |
| 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 12 final_syntax_test_01_multi.main = function() { |
| 13 let f0 = 42; |
| 14 let f1 = null; |
| 15 let f2 = 87; |
| 16 expect$.Expect.equals(42, f0); |
| 17 expect$.Expect.equals(87, f2); |
| 18 expect$.Expect.equals(42, final_syntax_test_01_multi.F0); |
| 19 expect$.Expect.equals(87, final_syntax_test_01_multi.F2); |
| 20 expect$.Expect.isTrue(final_syntax_test_01_multi.Point.is(final_syntax_test_
01_multi.P0)); |
| 21 expect$.Expect.isTrue(typeof final_syntax_test_01_multi.P1 == 'number'); |
| 22 expect$.Expect.isTrue(final_syntax_test_01_multi.Point.is(final_syntax_test_
01_multi.P2)); |
| 23 expect$.Expect.isTrue(typeof final_syntax_test_01_multi.P3 == 'number'); |
| 24 expect$.Expect.isTrue(typeof final_syntax_test_01_multi.A0 == 'number'); |
| 25 expect$.Expect.isTrue(typeof final_syntax_test_01_multi.A1 == 'number'); |
| 26 expect$.Expect.isTrue(final_syntax_test_01_multi.C1.is(final_syntax_test_01_
multi.C0.X)); |
| 27 expect$.Expect.equals("Hello 42", final_syntax_test_01_multi.B2); |
| 28 }; |
| 29 dart.fn(final_syntax_test_01_multi.main, VoidTodynamic()); |
| 30 final_syntax_test_01_multi.F0 = 42; |
| 31 final_syntax_test_01_multi.F2 = 87; |
| 32 final_syntax_test_01_multi.Point = class Point extends core.Object { |
| 33 new(x, y) { |
| 34 this.x = x; |
| 35 this.y = y; |
| 36 } |
| 37 ['+'](other) { |
| 38 return this.x; |
| 39 } |
| 40 }; |
| 41 dart.setSignature(final_syntax_test_01_multi.Point, { |
| 42 constructors: () => ({new: dart.definiteFunctionType(final_syntax_test_01_mu
lti.Point, [dart.dynamic, dart.dynamic])}), |
| 43 methods: () => ({'+': dart.definiteFunctionType(dart.dynamic, [core.int])}) |
| 44 }); |
| 45 final_syntax_test_01_multi.P0 = dart.const(new final_syntax_test_01_multi.Poin
t(0, 0)); |
| 46 dart.defineLazy(final_syntax_test_01_multi, { |
| 47 get P1() { |
| 48 return dart.const(new final_syntax_test_01_multi.Point(0, 0))['+'](1); |
| 49 } |
| 50 }); |
| 51 dart.defineLazy(final_syntax_test_01_multi, { |
| 52 get P2() { |
| 53 return new final_syntax_test_01_multi.Point(0, 0); |
| 54 } |
| 55 }); |
| 56 dart.defineLazy(final_syntax_test_01_multi, { |
| 57 get P3() { |
| 58 return new final_syntax_test_01_multi.Point(0, 0)['+'](1); |
| 59 } |
| 60 }); |
| 61 final_syntax_test_01_multi.A0 = 42; |
| 62 dart.defineLazy(final_syntax_test_01_multi, { |
| 63 get A1() { |
| 64 return dart.notNull(final_syntax_test_01_multi.A0) + 1; |
| 65 } |
| 66 }); |
| 67 final_syntax_test_01_multi.C0 = class C0 extends core.Object {}; |
| 68 dart.defineLazy(final_syntax_test_01_multi.C0, { |
| 69 get X() { |
| 70 return dart.const(new final_syntax_test_01_multi.C1()); |
| 71 } |
| 72 }); |
| 73 final_syntax_test_01_multi.C1 = class C1 extends core.Object { |
| 74 new() { |
| 75 this.x = null; |
| 76 } |
| 77 }; |
| 78 dart.setSignature(final_syntax_test_01_multi.C1, { |
| 79 constructors: () => ({new: dart.definiteFunctionType(final_syntax_test_01_mu
lti.C1, [])}) |
| 80 }); |
| 81 final_syntax_test_01_multi.B0 = 42; |
| 82 final_syntax_test_01_multi.B1 = "Hello"; |
| 83 dart.defineLazy(final_syntax_test_01_multi, { |
| 84 get B2() { |
| 85 return dart.str`${final_syntax_test_01_multi.B1} ${final_syntax_test_01_mu
lti.B0}`; |
| 86 } |
| 87 }); |
| 88 // Exports: |
| 89 exports.final_syntax_test_01_multi = final_syntax_test_01_multi; |
| 90 }); |
OLD | NEW |