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