mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
22 lines
391 B
TypeScript
22 lines
391 B
TypeScript
//// [tests/cases/conformance/es6/for-ofStatements/for-of25.ts] ////
|
|
|
|
//// [for-of25.ts]
|
|
class MyStringIterator {
|
|
[Symbol.iterator]() {
|
|
return x;
|
|
}
|
|
}
|
|
|
|
var x: any;
|
|
for (var v of new MyStringIterator) { }
|
|
|
|
//// [for-of25.js]
|
|
"use strict";
|
|
class MyStringIterator {
|
|
[Symbol.iterator]() {
|
|
return x;
|
|
}
|
|
}
|
|
var x;
|
|
for (var v of new MyStringIterator) { }
|