mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 03:31:45 +03:00
11 lines
280 B
TypeScript
11 lines
280 B
TypeScript
//@target: ES6
|
|
class StringIterator {
|
|
[Symbol.iterator]() {
|
|
return this;
|
|
}
|
|
}
|
|
|
|
var v: string;
|
|
for (v of new StringIterator) { } // Should fail
|
|
|
|
for (v of new StringIterator) { } // Should still fail (related errors should still be shown even though type is cached).
|