TypeScript/tests/baselines/reference/for-of16.types

23 lines
454 B
Text
Raw Normal View History

=== tests/cases/conformance/es6/for-ofStatements/for-of16.ts ===
class StringIterator {
>StringIterator : StringIterator
[Symbol.iterator]() {
>Symbol.iterator : symbol
>Symbol : SymbolConstructor
>iterator : symbol
return this;
>this : this
}
}
var v: string;
>v : string
for (v of new StringIterator) { } // Should fail
>v : string
>new StringIterator : StringIterator
>StringIterator : typeof StringIterator