OLD | NEW |
1 dart_library.library('language/flatten_test_02_multi', null, /* Imports */[ | 1 dart_library.library('language/flatten_test_02_multi', null, /* Imports */[ |
2 'dart_sdk' | 2 'dart_sdk' |
3 ], function load__flatten_test_02_multi(exports, dart_sdk) { | 3 ], function load__flatten_test_02_multi(exports, dart_sdk) { |
4 'use strict'; | 4 'use strict'; |
5 const core = dart_sdk.core; | 5 const core = dart_sdk.core; |
6 const async = dart_sdk.async; | 6 const async = dart_sdk.async; |
7 const dart = dart_sdk.dart; | 7 const dart = dart_sdk.dart; |
8 const dartx = dart_sdk.dartx; | 8 const dartx = dart_sdk.dartx; |
9 const flatten_test_02_multi = Object.create(null); | 9 const flatten_test_02_multi = Object.create(null); |
10 let Derived = () => (Derived = dart.constFn(flatten_test_02_multi.Derived$()))
(); | 10 let Derived = () => (Derived = dart.constFn(flatten_test_02_multi.Derived$()))
(); |
11 let FixedPoint = () => (FixedPoint = dart.constFn(flatten_test_02_multi.FixedP
oint$()))(); | 11 let FixedPoint = () => (FixedPoint = dart.constFn(flatten_test_02_multi.FixedP
oint$()))(); |
12 let DerivedOfint = () => (DerivedOfint = dart.constFn(flatten_test_02_multi.De
rived$(core.int)))(); | 12 let DerivedOfint = () => (DerivedOfint = dart.constFn(flatten_test_02_multi.De
rived$(core.int)))(); |
13 let FutureOfint = () => (FutureOfint = dart.constFn(async.Future$(core.int)))(
); | 13 let FutureOfint = () => (FutureOfint = dart.constFn(async.Future$(core.int)))(
); |
14 let VoidToFutureOfint = () => (VoidToFutureOfint = dart.constFn(dart.definiteF
unctionType(FutureOfint(), [])))(); | 14 let VoidToFutureOfint = () => (VoidToFutureOfint = dart.constFn(dart.definiteF
unctionType(FutureOfint(), [])))(); |
15 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); | 15 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
16 flatten_test_02_multi.Derived$ = dart.generic(T => { | 16 flatten_test_02_multi.Derived$ = dart.generic(T => { |
17 let FutureOfT = () => (FutureOfT = dart.constFn(async.Future$(T)))(); | 17 let FutureOfT = () => (FutureOfT = dart.constFn(async.Future$(T)))(); |
| 18 let StreamOfT = () => (StreamOfT = dart.constFn(async.Stream$(T)))(); |
18 class Derived extends core.Object { | 19 class Derived extends core.Object { |
19 noSuchMethod(invocation) { | 20 noSuchMethod(invocation) { |
20 return super.noSuchMethod(invocation); | 21 return super.noSuchMethod(invocation); |
21 } | 22 } |
| 23 wait(T) { |
| 24 return (futures, opts) => { |
| 25 return async.Future$(core.List$(T))._check(this.noSuchMethod(new dart.
InvocationImpl('wait', [futures], {namedArguments: opts, isMethod: true}))); |
| 26 }; |
| 27 } |
| 28 any(T) { |
| 29 return futures => { |
| 30 return async.Future$(T)._check(this.noSuchMethod(new dart.InvocationIm
pl('any', [futures], {isMethod: true}))); |
| 31 }; |
| 32 } |
| 33 forEach(input, f) { |
| 34 return async.Future._check(this.noSuchMethod(new dart.InvocationImpl('fo
rEach', [input, f], {isMethod: true}))); |
| 35 } |
| 36 doWhile(f) { |
| 37 return async.Future._check(this.noSuchMethod(new dart.InvocationImpl('do
While', [f], {isMethod: true}))); |
| 38 } |
| 39 then(S) { |
| 40 return (onValue, opts) => { |
| 41 return async.Future$(S)._check(this.noSuchMethod(new dart.InvocationIm
pl('then', [onValue], {namedArguments: opts, isMethod: true}))); |
| 42 }; |
| 43 } |
| 44 catchError(onError, opts) { |
| 45 return FutureOfT()._check(this.noSuchMethod(new dart.InvocationImpl('cat
chError', [onError], {namedArguments: opts, isMethod: true}))); |
| 46 } |
| 47 whenComplete(action) { |
| 48 return FutureOfT()._check(this.noSuchMethod(new dart.InvocationImpl('whe
nComplete', [action], {isMethod: true}))); |
| 49 } |
| 50 asStream() { |
| 51 return StreamOfT()._check(this.noSuchMethod(new dart.InvocationImpl('asS
tream', [], {isMethod: true}))); |
| 52 } |
| 53 timeout(timeLimit, opts) { |
| 54 return FutureOfT()._check(this.noSuchMethod(new dart.InvocationImpl('tim
eout', [timeLimit], {namedArguments: opts, isMethod: true}))); |
| 55 } |
| 56 get _nullFuture() { |
| 57 return async._Future._check(this.noSuchMethod(new dart.InvocationImpl('_
nullFuture', [], {isGetter: true}))); |
| 58 } |
22 } | 59 } |
23 dart.addTypeTests(Derived); | 60 dart.addTypeTests(Derived); |
24 Derived[dart.implements] = () => [FutureOfT()]; | 61 Derived[dart.implements] = () => [FutureOfT()]; |
25 return Derived; | 62 return Derived; |
26 }); | 63 }); |
27 flatten_test_02_multi.Derived = Derived(); | 64 flatten_test_02_multi.Derived = Derived(); |
28 flatten_test_02_multi.FixedPoint$ = dart.generic(T => { | 65 flatten_test_02_multi.FixedPoint$ = dart.generic(T => { |
29 let FixedPointOfT = () => (FixedPointOfT = dart.constFn(flatten_test_02_mult
i.FixedPoint$(T)))(); | 66 let FixedPointOfT = () => (FixedPointOfT = dart.constFn(flatten_test_02_mult
i.FixedPoint$(T)))(); |
30 let FutureOfFixedPointOfT = () => (FutureOfFixedPointOfT = dart.constFn(asyn
c.Future$(FixedPointOfT())))(); | 67 let FutureOfFixedPointOfT = () => (FutureOfFixedPointOfT = dart.constFn(asyn
c.Future$(FixedPointOfT())))(); |
| 68 let StreamOfFixedPointOfT = () => (StreamOfFixedPointOfT = dart.constFn(asyn
c.Stream$(FixedPointOfT())))(); |
31 class FixedPoint extends core.Object { | 69 class FixedPoint extends core.Object { |
32 noSuchMethod(invocation) { | 70 noSuchMethod(invocation) { |
33 return super.noSuchMethod(invocation); | 71 return super.noSuchMethod(invocation); |
34 } | 72 } |
| 73 wait(T) { |
| 74 return (futures, opts) => { |
| 75 return async.Future$(core.List$(T))._check(this.noSuchMethod(new dart.
InvocationImpl('wait', [futures], {namedArguments: opts, isMethod: true}))); |
| 76 }; |
| 77 } |
| 78 any(T) { |
| 79 return futures => { |
| 80 return async.Future$(T)._check(this.noSuchMethod(new dart.InvocationIm
pl('any', [futures], {isMethod: true}))); |
| 81 }; |
| 82 } |
| 83 forEach(input, f) { |
| 84 return async.Future._check(this.noSuchMethod(new dart.InvocationImpl('fo
rEach', [input, f], {isMethod: true}))); |
| 85 } |
| 86 doWhile(f) { |
| 87 return async.Future._check(this.noSuchMethod(new dart.InvocationImpl('do
While', [f], {isMethod: true}))); |
| 88 } |
| 89 then(S) { |
| 90 return (onValue, opts) => { |
| 91 return async.Future$(S)._check(this.noSuchMethod(new dart.InvocationIm
pl('then', [onValue], {namedArguments: opts, isMethod: true}))); |
| 92 }; |
| 93 } |
| 94 catchError(onError, opts) { |
| 95 return FutureOfFixedPointOfT()._check(this.noSuchMethod(new dart.Invocat
ionImpl('catchError', [onError], {namedArguments: opts, isMethod: true}))); |
| 96 } |
| 97 whenComplete(action) { |
| 98 return FutureOfFixedPointOfT()._check(this.noSuchMethod(new dart.Invocat
ionImpl('whenComplete', [action], {isMethod: true}))); |
| 99 } |
| 100 asStream() { |
| 101 return StreamOfFixedPointOfT()._check(this.noSuchMethod(new dart.Invocat
ionImpl('asStream', [], {isMethod: true}))); |
| 102 } |
| 103 timeout(timeLimit, opts) { |
| 104 return FutureOfFixedPointOfT()._check(this.noSuchMethod(new dart.Invocat
ionImpl('timeout', [timeLimit], {namedArguments: opts, isMethod: true}))); |
| 105 } |
| 106 get _nullFuture() { |
| 107 return async._Future._check(this.noSuchMethod(new dart.InvocationImpl('_
nullFuture', [], {isGetter: true}))); |
| 108 } |
35 } | 109 } |
36 dart.addTypeTests(FixedPoint); | 110 dart.addTypeTests(FixedPoint); |
37 FixedPoint[dart.implements] = () => [FutureOfFixedPointOfT()]; | 111 FixedPoint[dart.implements] = () => [FutureOfFixedPointOfT()]; |
38 return FixedPoint; | 112 return FixedPoint; |
39 }); | 113 }); |
40 flatten_test_02_multi.FixedPoint = FixedPoint(); | 114 flatten_test_02_multi.FixedPoint = FixedPoint(); |
41 flatten_test_02_multi.test = function() { | 115 flatten_test_02_multi.test = function() { |
42 return dart.async(function*() { | 116 return dart.async(function*() { |
43 function f() { | 117 function f() { |
44 return dart.async(function*() { | 118 return dart.async(function*() { |
45 return new (DerivedOfint())(); | 119 return new (DerivedOfint())(); |
46 }, core.int); | 120 }, core.int); |
47 } | 121 } |
48 dart.fn(f, VoidToFutureOfint()); | 122 dart.fn(f, VoidToFutureOfint()); |
49 }, dart.dynamic); | 123 }, dart.dynamic); |
50 }; | 124 }; |
51 dart.fn(flatten_test_02_multi.test, VoidTodynamic()); | 125 dart.fn(flatten_test_02_multi.test, VoidTodynamic()); |
52 flatten_test_02_multi.main = function() { | 126 flatten_test_02_multi.main = function() { |
53 flatten_test_02_multi.test(); | 127 flatten_test_02_multi.test(); |
54 }; | 128 }; |
55 dart.fn(flatten_test_02_multi.main, VoidTodynamic()); | 129 dart.fn(flatten_test_02_multi.main, VoidTodynamic()); |
56 // Exports: | 130 // Exports: |
57 exports.flatten_test_02_multi = flatten_test_02_multi; | 131 exports.flatten_test_02_multi = flatten_test_02_multi; |
58 }); | 132 }); |
OLD | NEW |