2015-02-24 04:07:45 +01:00
|
|
|
=== tests/cases/conformance/es6/for-ofStatements/for-of18.ts ===
|
|
|
|
var v: string;
|
2015-04-13 22:54:22 +02:00
|
|
|
>v : string, Symbol(v,Decl(for-of18.ts,0,3))
|
2015-02-24 04:07:45 +01:00
|
|
|
|
|
|
|
for (v of new StringIterator) { } // Should succeed
|
2015-04-13 22:54:22 +02:00
|
|
|
>v : string, Symbol(v,Decl(for-of18.ts,0,3))
|
2015-02-24 04:07:45 +01:00
|
|
|
>new StringIterator : StringIterator
|
2015-04-13 22:54:22 +02:00
|
|
|
>StringIterator : typeof StringIterator, Symbol(StringIterator,Decl(for-of18.ts,1,33))
|
2015-02-24 04:07:45 +01:00
|
|
|
|
|
|
|
class StringIterator {
|
2015-04-13 22:54:22 +02:00
|
|
|
>StringIterator : StringIterator, Symbol(StringIterator,Decl(for-of18.ts,1,33))
|
2015-02-24 04:07:45 +01:00
|
|
|
|
|
|
|
next() {
|
2015-04-13 22:54:22 +02:00
|
|
|
>next : () => { value: string; done: boolean; }, Symbol(next,Decl(for-of18.ts,3,22))
|
2015-02-24 04:07:45 +01:00
|
|
|
|
|
|
|
return {
|
|
|
|
>{ value: "", done: false } : { value: string; done: boolean; }
|
|
|
|
|
|
|
|
value: "",
|
2015-04-13 22:54:22 +02:00
|
|
|
>value : string, Symbol(value,Decl(for-of18.ts,5,16))
|
2015-04-13 21:36:11 +02:00
|
|
|
>"" : string
|
2015-02-24 04:07:45 +01:00
|
|
|
|
|
|
|
done: false
|
2015-04-13 22:54:22 +02:00
|
|
|
>done : boolean, Symbol(done,Decl(for-of18.ts,6,22))
|
2015-04-13 21:36:11 +02:00
|
|
|
>false : boolean
|
2015-02-24 04:07:45 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
[Symbol.iterator]() {
|
2015-04-13 22:54:22 +02:00
|
|
|
>Symbol.iterator : symbol, Symbol(SymbolConstructor.iterator,Decl(lib.d.ts,1236,31))
|
|
|
|
>Symbol : SymbolConstructor, Symbol(Symbol,Decl(lib.d.ts,1186,52),Decl(lib.d.ts,1262,11))
|
|
|
|
>iterator : symbol, Symbol(SymbolConstructor.iterator,Decl(lib.d.ts,1236,31))
|
2015-02-24 04:07:45 +01:00
|
|
|
|
|
|
|
return this;
|
2015-04-13 22:54:22 +02:00
|
|
|
>this : StringIterator, Symbol(StringIterator,Decl(for-of18.ts,1,33))
|
2015-02-24 04:07:45 +01:00
|
|
|
}
|
|
|
|
}
|