26 lines
1.1 KiB
Text
26 lines
1.1 KiB
Text
=== tests/cases/conformance/es6/Symbols/symbolProperty55.ts ===
|
|
var obj = {
|
|
>obj : Symbol(obj, Decl(symbolProperty55.ts, 0, 3))
|
|
|
|
[Symbol.iterator]: 0
|
|
>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))
|
|
|
|
};
|
|
|
|
module M {
|
|
>M : Symbol(M, Decl(symbolProperty55.ts, 2, 2))
|
|
|
|
var Symbol: SymbolConstructor;
|
|
>Symbol : Symbol(Symbol, Decl(symbolProperty55.ts, 5, 7))
|
|
>SymbolConstructor : Symbol(SymbolConstructor, Decl(lib.d.ts, 1196, 1))
|
|
|
|
// The following should be of type 'any'. This is because even though obj has a property keyed by Symbol.iterator,
|
|
// the key passed in here is the *wrong* Symbol.iterator. It is not the iterator property of the global Symbol.
|
|
obj[Symbol.iterator];
|
|
>obj : Symbol(obj, Decl(symbolProperty55.ts, 0, 3))
|
|
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31))
|
|
>Symbol : Symbol(Symbol, Decl(symbolProperty55.ts, 5, 7))
|
|
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 1236, 31))
|
|
}
|