OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/abstract_object_method_test', null, /* Imports */
[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__abstract_object_method_test(exports, dart_sdk, expect) { |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const _interceptors = dart_sdk._interceptors; |
| 8 const dart = dart_sdk.dart; |
| 9 const dartx = dart_sdk.dartx; |
| 10 const expect$ = expect.expect; |
| 11 const abstract_object_method_test = Object.create(null); |
| 12 let JSArrayOfC = () => (JSArrayOfC = dart.constFn(_interceptors.JSArray$(abstr
act_object_method_test.C)))(); |
| 13 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 14 abstract_object_method_test.A = dart.callableClass(function A(...args) { |
| 15 const self = this; |
| 16 function call(...args) { |
| 17 return self.call.apply(self, args); |
| 18 } |
| 19 call.__proto__ = this.__proto__; |
| 20 call.new.apply(call, args); |
| 21 return call; |
| 22 }, class A extends core.Object { |
| 23 noSuchMethod(_) { |
| 24 expect$.Expect.fail('Should not reach here'); |
| 25 } |
| 26 }); |
| 27 abstract_object_method_test.B = class B extends abstract_object_method_test.A
{}; |
| 28 abstract_object_method_test.C = class C extends abstract_object_method_test.B
{}; |
| 29 dart.defineLazy(abstract_object_method_test, { |
| 30 get a() { |
| 31 return JSArrayOfC().of([new abstract_object_method_test.C()]); |
| 32 }, |
| 33 set a(_) {} |
| 34 }); |
| 35 abstract_object_method_test.main = function() { |
| 36 let c = abstract_object_method_test.a[dartx.get](0); |
| 37 abstract_object_method_test.a[dartx.add](c); |
| 38 expect$.Expect.isTrue(dart.equals(c, abstract_object_method_test.a[dartx.get
](1))); |
| 39 }; |
| 40 dart.fn(abstract_object_method_test.main, VoidTodynamic()); |
| 41 // Exports: |
| 42 exports.abstract_object_method_test = abstract_object_method_test; |
| 43 }); |
OLD | NEW |