43 lines
1.9 KiB
Text
43 lines
1.9 KiB
Text
=== tests/cases/conformance/es6/Symbols/symbolProperty40.ts ===
|
|
class C {
|
|
>C : Symbol(C, Decl(symbolProperty40.ts, 0, 0))
|
|
|
|
[Symbol.iterator](x: string): string;
|
|
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31))
|
|
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11))
|
|
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31))
|
|
>x : Symbol(x, Decl(symbolProperty40.ts, 1, 22))
|
|
|
|
[Symbol.iterator](x: number): number;
|
|
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31))
|
|
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11))
|
|
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31))
|
|
>x : Symbol(x, Decl(symbolProperty40.ts, 2, 22))
|
|
|
|
[Symbol.iterator](x: any) {
|
|
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31))
|
|
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11))
|
|
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31))
|
|
>x : Symbol(x, Decl(symbolProperty40.ts, 3, 22))
|
|
|
|
return undefined;
|
|
>undefined : Symbol(undefined)
|
|
}
|
|
}
|
|
|
|
var c = new C;
|
|
>c : Symbol(c, Decl(symbolProperty40.ts, 8, 3))
|
|
>C : Symbol(C, Decl(symbolProperty40.ts, 0, 0))
|
|
|
|
c[Symbol.iterator]("");
|
|
>c : Symbol(c, Decl(symbolProperty40.ts, 8, 3))
|
|
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31))
|
|
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11))
|
|
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31))
|
|
|
|
c[Symbol.iterator](0);
|
|
>c : Symbol(c, Decl(symbolProperty40.ts, 8, 3))
|
|
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31))
|
|
>Symbol : Symbol(Symbol, Decl(lib.d.ts, 1186, 52), Decl(lib.d.ts, 1292, 11))
|
|
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31))
|
|
|