39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
=== tests/cases/conformance/es6/for-ofStatements/for-of23.ts ===
|
|
class Foo { }
|
|
>Foo : Symbol(Foo, Decl(for-of23.ts, 0, 0))
|
|
|
|
class FooIterator {
|
|
>FooIterator : Symbol(FooIterator, Decl(for-of23.ts, 0, 13))
|
|
|
|
next() {
|
|
>next : Symbol(FooIterator.next, Decl(for-of23.ts, 1, 19))
|
|
|
|
return {
|
|
value: new Foo,
|
|
>value : Symbol(value, Decl(for-of23.ts, 3, 16))
|
|
>Foo : Symbol(Foo, Decl(for-of23.ts, 0, 0))
|
|
|
|
done: false
|
|
>done : Symbol(done, Decl(for-of23.ts, 4, 27))
|
|
|
|
};
|
|
}
|
|
[Symbol.iterator]() {
|
|
>[Symbol.iterator] : Symbol(FooIterator[Symbol.iterator], Decl(for-of23.ts, 7, 5))
|
|
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
|
|
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
|
|
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
|
|
|
|
return this;
|
|
>this : Symbol(FooIterator, Decl(for-of23.ts, 0, 13))
|
|
}
|
|
}
|
|
|
|
for (const v of new FooIterator) {
|
|
>v : Symbol(v, Decl(for-of23.ts, 13, 10))
|
|
>FooIterator : Symbol(FooIterator, Decl(for-of23.ts, 0, 13))
|
|
|
|
const v = 0; // new scope
|
|
>v : Symbol(v, Decl(for-of23.ts, 14, 9))
|
|
}
|