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