50 lines
2.2 KiB
Text
50 lines
2.2 KiB
Text
=== tests/cases/conformance/es6/Symbols/symbolProperty40.ts ===
|
|
class C {
|
|
>C : C, Symbol(C,Decl(symbolProperty40.ts,0,0))
|
|
|
|
[Symbol.iterator](x: string): string;
|
|
>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))
|
|
>x : string, Symbol(x,Decl(symbolProperty40.ts,1,22))
|
|
|
|
[Symbol.iterator](x: number): number;
|
|
>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))
|
|
>x : number, Symbol(x,Decl(symbolProperty40.ts,2,22))
|
|
|
|
[Symbol.iterator](x: any) {
|
|
>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))
|
|
>x : any, Symbol(x,Decl(symbolProperty40.ts,3,22))
|
|
|
|
return undefined;
|
|
>undefined : undefined, Symbol(undefined)
|
|
}
|
|
}
|
|
|
|
var c = new C;
|
|
>c : C, Symbol(c,Decl(symbolProperty40.ts,8,3))
|
|
>new C : C
|
|
>C : typeof C, Symbol(C,Decl(symbolProperty40.ts,0,0))
|
|
|
|
c[Symbol.iterator]("");
|
|
>c[Symbol.iterator]("") : string
|
|
>c[Symbol.iterator] : { (x: string): string; (x: number): number; }
|
|
>c : C, Symbol(c,Decl(symbolProperty40.ts,8,3))
|
|
>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))
|
|
>"" : string
|
|
|
|
c[Symbol.iterator](0);
|
|
>c[Symbol.iterator](0) : number
|
|
>c[Symbol.iterator] : { (x: string): string; (x: number): number; }
|
|
>c : C, Symbol(c,Decl(symbolProperty40.ts,8,3))
|
|
>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))
|
|
>0 : number
|
|
|