2015-03-24 01:29:01 +01:00
|
|
|
tests/cases/conformance/es6/for-ofStatements/for-of16.ts(2,11): error TS2489: An iterator must have a 'next()' method.
|
2015-02-24 04:07:45 +01:00
|
|
|
|
|
|
|
|
|
|
|
==== tests/cases/conformance/es6/for-ofStatements/for-of16.ts (1 errors) ====
|
|
|
|
var v: string;
|
|
|
|
for (v of new StringIterator) { } // Should fail
|
|
|
|
~~~~~~~~~~~~~~~~~~
|
2015-03-24 01:29:01 +01:00
|
|
|
!!! error TS2489: An iterator must have a 'next()' method.
|
2015-02-24 04:07:45 +01:00
|
|
|
|
|
|
|
class StringIterator {
|
|
|
|
[Symbol.iterator]() {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|