OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/getter_override3_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__getter_override3_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 getter_override3_test = Object.create(null); |
| 11 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da
rt.void, [])))(); |
| 12 const _x = Symbol('_x'); |
| 13 getter_override3_test.A = class A extends core.Object { |
| 14 new() { |
| 15 this[_x] = 42; |
| 16 } |
| 17 set x(val) { |
| 18 this[_x] = val; |
| 19 } |
| 20 }; |
| 21 getter_override3_test.B = class B extends getter_override3_test.A { |
| 22 new() { |
| 23 super.new(); |
| 24 } |
| 25 get x() { |
| 26 return this[_x]; |
| 27 } |
| 28 set x(value) { |
| 29 super.x = value; |
| 30 } |
| 31 }; |
| 32 getter_override3_test.main = function() { |
| 33 let b = new getter_override3_test.B(); |
| 34 expect$.Expect.equals(42, b.x); |
| 35 b.x = 21; |
| 36 expect$.Expect.equals(21, b.x); |
| 37 }; |
| 38 dart.fn(getter_override3_test.main, VoidTovoid()); |
| 39 // Exports: |
| 40 exports.getter_override3_test = getter_override3_test; |
| 41 }); |
OLD | NEW |