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