mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 03:01:48 +03:00
b887b30092
**Description:** This is required for https://github.com/swc-project/swc/pull/6981 and https://github.com/swc-project/swc/pull/6950
11 lines
283 B
TypeScript
11 lines
283 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).
|