26 lines
873 B
Text
26 lines
873 B
Text
=== tests/cases/conformance/es6/for-ofStatements/for-of15.ts ===
|
|
class StringIterator {
|
|
>StringIterator : Symbol(StringIterator, Decl(for-of15.ts, 0, 0))
|
|
|
|
next() {
|
|
>next : Symbol(StringIterator.next, Decl(for-of15.ts, 0, 22))
|
|
|
|
return "";
|
|
}
|
|
[Symbol.iterator]() {
|
|
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es6.d.ts, --, --))
|
|
>Symbol : Symbol(Symbol, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
|
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es6.d.ts, --, --))
|
|
|
|
return this;
|
|
>this : Symbol(StringIterator, Decl(for-of15.ts, 0, 0))
|
|
}
|
|
}
|
|
|
|
var v: string;
|
|
>v : Symbol(v, Decl(for-of15.ts, 9, 3))
|
|
|
|
for (v of new StringIterator) { } // Should fail
|
|
>v : Symbol(v, Decl(for-of15.ts, 9, 3))
|
|
>StringIterator : Symbol(StringIterator, Decl(for-of15.ts, 0, 0))
|
|
|