2015-02-24 20:31:42 +01:00
|
|
|
=== tests/cases/conformance/es6/for-ofStatements/for-of23.ts ===
|
|
|
|
for (const v of new FooIterator) {
|
2015-04-13 22:54:22 +02:00
|
|
|
>v : Foo, Symbol(v,Decl(for-of23.ts,0,10))
|
2015-02-24 20:31:42 +01:00
|
|
|
>new FooIterator : FooIterator
|
2015-04-13 22:54:22 +02:00
|
|
|
>FooIterator : typeof FooIterator, Symbol(FooIterator,Decl(for-of23.ts,4,13))
|
2015-02-24 20:31:42 +01:00
|
|
|
|
|
|
|
const v = 0; // new scope
|
2015-04-13 22:54:22 +02:00
|
|
|
>v : number, Symbol(v,Decl(for-of23.ts,1,9))
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2015-02-24 20:31:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
class Foo { }
|
2015-04-13 22:54:22 +02:00
|
|
|
>Foo : Foo, Symbol(Foo,Decl(for-of23.ts,2,1))
|
2015-02-24 20:31:42 +01:00
|
|
|
|
|
|
|
class FooIterator {
|
2015-04-13 22:54:22 +02:00
|
|
|
>FooIterator : FooIterator, Symbol(FooIterator,Decl(for-of23.ts,4,13))
|
2015-02-24 20:31:42 +01:00
|
|
|
|
|
|
|
next() {
|
2015-04-13 22:54:22 +02:00
|
|
|
>next : () => { value: Foo; done: boolean; }, Symbol(next,Decl(for-of23.ts,5,19))
|
2015-02-24 20:31:42 +01:00
|
|
|
|
|
|
|
return {
|
|
|
|
>{ value: new Foo, done: false } : { value: Foo; done: boolean; }
|
|
|
|
|
|
|
|
value: new Foo,
|
2015-04-13 22:54:22 +02:00
|
|
|
>value : Foo, Symbol(value,Decl(for-of23.ts,7,16))
|
2015-02-24 20:31:42 +01:00
|
|
|
>new Foo : Foo
|
2015-04-13 22:54:22 +02:00
|
|
|
>Foo : typeof Foo, Symbol(Foo,Decl(for-of23.ts,2,1))
|
2015-02-24 20:31:42 +01:00
|
|
|
|
|
|
|
done: false
|
2015-04-13 22:54:22 +02:00
|
|
|
>done : boolean, Symbol(done,Decl(for-of23.ts,8,27))
|
2015-04-13 21:36:11 +02:00
|
|
|
>false : boolean
|
2015-02-24 20:31:42 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
[Symbol.iterator]() {
|
2015-04-13 22:54:22 +02:00
|
|
|
>Symbol.iterator : symbol, Symbol(SymbolConstructor.iterator,Decl(lib.d.ts,1236,31))
|
|
|
|
>Symbol : SymbolConstructor, Symbol(Symbol,Decl(lib.d.ts,1186,52),Decl(lib.d.ts,1262,11))
|
|
|
|
>iterator : symbol, Symbol(SymbolConstructor.iterator,Decl(lib.d.ts,1236,31))
|
2015-02-24 20:31:42 +01:00
|
|
|
|
|
|
|
return this;
|
2015-04-13 22:54:22 +02:00
|
|
|
>this : FooIterator, Symbol(FooIterator,Decl(for-of23.ts,4,13))
|
2015-02-24 20:31:42 +01:00
|
|
|
}
|
|
|
|
}
|