OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/setter1_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__setter1_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 setter1_test = Object.create(null); |
| 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 12 setter1_test.First = class First extends core.Object { |
| 13 new(val) { |
| 14 this.a_ = val; |
| 15 } |
| 16 testMethod() { |
| 17 this.a = 20; |
| 18 } |
| 19 static testStaticMethod() { |
| 20 setter1_test.First.b = 20; |
| 21 } |
| 22 get a() { |
| 23 return this.a_; |
| 24 } |
| 25 set a(val) { |
| 26 this.a_ = dart.notNull(this.a_) + dart.notNull(val); |
| 27 } |
| 28 static get b() { |
| 29 return setter1_test.First.b_; |
| 30 } |
| 31 static set b(val) { |
| 32 setter1_test.First.b_ = val; |
| 33 } |
| 34 }; |
| 35 dart.setSignature(setter1_test.First, { |
| 36 constructors: () => ({new: dart.definiteFunctionType(setter1_test.First, [co
re.int])}), |
| 37 methods: () => ({testMethod: dart.definiteFunctionType(dart.void, [])}), |
| 38 statics: () => ({testStaticMethod: dart.definiteFunctionType(dart.void, [])}
), |
| 39 names: ['testStaticMethod'] |
| 40 }); |
| 41 setter1_test.First.b_ = null; |
| 42 setter1_test.Second = class Second extends core.Object { |
| 43 new(value) { |
| 44 this.a_ = value; |
| 45 } |
| 46 testMethod() { |
| 47 this.a = 20; |
| 48 } |
| 49 static testStaticMethod() { |
| 50 let i = null; |
| 51 setter1_test.Second.b = 20; |
| 52 i = setter1_test.Second.d; |
| 53 } |
| 54 get a() { |
| 55 return this.a_; |
| 56 } |
| 57 set a(value) { |
| 58 this.a_ = dart.notNull(this.a_) + dart.notNull(value); |
| 59 } |
| 60 static set b(value) { |
| 61 setter1_test.Second.c = value; |
| 62 } |
| 63 static get d() { |
| 64 return setter1_test.Second.c; |
| 65 } |
| 66 }; |
| 67 dart.setSignature(setter1_test.Second, { |
| 68 constructors: () => ({new: dart.definiteFunctionType(setter1_test.Second, [c
ore.int])}), |
| 69 methods: () => ({testMethod: dart.definiteFunctionType(dart.void, [])}), |
| 70 statics: () => ({testStaticMethod: dart.definiteFunctionType(dart.void, [])}
), |
| 71 names: ['testStaticMethod'] |
| 72 }); |
| 73 setter1_test.Second.c = null; |
| 74 setter1_test.Setter1Test = class Setter1Test extends core.Object { |
| 75 static testMain() { |
| 76 let obj1 = new setter1_test.First(10); |
| 77 expect$.Expect.equals(10, obj1.a); |
| 78 obj1.testMethod(); |
| 79 expect$.Expect.equals(30, obj1.a); |
| 80 setter1_test.First.b = 10; |
| 81 expect$.Expect.equals(10, setter1_test.First.b); |
| 82 setter1_test.First.testStaticMethod(); |
| 83 expect$.Expect.equals(20, setter1_test.First.b); |
| 84 let obj = new setter1_test.Second(10); |
| 85 expect$.Expect.equals(10, obj.a); |
| 86 obj.testMethod(); |
| 87 expect$.Expect.equals(30, obj.a); |
| 88 setter1_test.Second.testStaticMethod(); |
| 89 expect$.Expect.equals(20, setter1_test.Second.c); |
| 90 expect$.Expect.equals(20, setter1_test.Second.d); |
| 91 } |
| 92 }; |
| 93 dart.setSignature(setter1_test.Setter1Test, { |
| 94 statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}), |
| 95 names: ['testMain'] |
| 96 }); |
| 97 setter1_test.main = function() { |
| 98 setter1_test.Setter1Test.testMain(); |
| 99 }; |
| 100 dart.fn(setter1_test.main, VoidTodynamic()); |
| 101 // Exports: |
| 102 exports.setter1_test = setter1_test; |
| 103 }); |
OLD | NEW |