TypeScript/tests/baselines/reference/for-of16.errors.txt
2017-02-24 17:48:06 -08:00

14 lines
478 B
Plaintext

tests/cases/conformance/es6/for-ofStatements/for-of16.ts(8,11): error TS2489: An iterator must have a 'next()' method.
==== tests/cases/conformance/es6/for-ofStatements/for-of16.ts (1 errors) ====
class StringIterator {
[Symbol.iterator]() {
return this;
}
}
var v: string;
for (v of new StringIterator) { } // Should fail
~~~~~~~~~~~~~~~~~~
!!! error TS2489: An iterator must have a 'next()' method.