OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/super_in_async1_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__super_in_async1_test(exports, dart_sdk, expect) { |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const async = dart_sdk.async; |
| 8 const dart = dart_sdk.dart; |
| 9 const dartx = dart_sdk.dartx; |
| 10 const expect$ = expect.expect; |
| 11 const super_in_async1_test = Object.create(null); |
| 12 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 13 super_in_async1_test.A = class A extends core.Object { |
| 14 foo() { |
| 15 return dart.async(function*() { |
| 16 return 42; |
| 17 }, core.int); |
| 18 } |
| 19 }; |
| 20 dart.setSignature(super_in_async1_test.A, { |
| 21 methods: () => ({foo: dart.definiteFunctionType(async.Future$(core.int), [])
}) |
| 22 }); |
| 23 const super$foo = Symbol("super$foo"); |
| 24 super_in_async1_test.B = class B extends super_in_async1_test.A { |
| 25 foo() { |
| 26 return dart.async((function*() { |
| 27 let x = (yield this[super$foo]()); |
| 28 return dart.notNull(x) + 1; |
| 29 }).bind(this), core.int); |
| 30 } |
| 31 [super$foo]() { |
| 32 return super.foo(); |
| 33 } |
| 34 }; |
| 35 super_in_async1_test.main = function() { |
| 36 return dart.async(function*() { |
| 37 expect$.Expect.equals(43, yield new super_in_async1_test.B().foo()); |
| 38 }, dart.dynamic); |
| 39 }; |
| 40 dart.fn(super_in_async1_test.main, VoidTodynamic()); |
| 41 // Exports: |
| 42 exports.super_in_async1_test = super_in_async1_test; |
| 43 }); |
OLD | NEW |