tests/cases/conformance/es6/for-ofStatements/for-of16.ts(8,11): error TS2488: Type 'StringIterator' must have a '[Symbol.iterator]()' method that returns an iterator.
tests/cases/conformance/es6/for-ofStatements/for-of16.ts(10,11): error TS2488: Type 'StringIterator' must have a '[Symbol.iterator]()' method that returns an iterator.


==== tests/cases/conformance/es6/for-ofStatements/for-of16.ts (2 errors) ====
    class StringIterator {
        [Symbol.iterator]() {
            return this;
        }
    }
    
    var v: string;
    for (v of new StringIterator) { } // Should fail
              ~~~~~~~~~~~~~~~~~~
!!! error TS2488: Type 'StringIterator' must have a '[Symbol.iterator]()' method that returns an iterator.
!!! related TS2489 tests/cases/conformance/es6/for-ofStatements/for-of16.ts:8:11: An iterator must have a 'next()' method.
    
    for (v of new StringIterator) { } // Should still fail (related errors should still be shown even though type is cached).
              ~~~~~~~~~~~~~~~~~~
!!! error TS2488: Type 'StringIterator' must have a '[Symbol.iterator]()' method that returns an iterator.
!!! related TS2489 tests/cases/conformance/es6/for-ofStatements/for-of16.ts:10:11: An iterator must have a 'next()' method.