183 lines
9.7 KiB
Text
183 lines
9.7 KiB
Text
=== tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexingResults.ts ===
|
|
class C {
|
|
>C : Symbol(C, Decl(numericIndexingResults.ts, 0, 0))
|
|
|
|
[x: number]: string;
|
|
>x : Symbol(x, Decl(numericIndexingResults.ts, 1, 5))
|
|
|
|
1 = '';
|
|
"2" = ''
|
|
}
|
|
|
|
var c: C;
|
|
>c : Symbol(c, Decl(numericIndexingResults.ts, 6, 3))
|
|
>C : Symbol(C, Decl(numericIndexingResults.ts, 0, 0))
|
|
|
|
var r1 = c['1'];
|
|
>r1 : Symbol(r1, Decl(numericIndexingResults.ts, 7, 3), Decl(numericIndexingResults.ts, 21, 3), Decl(numericIndexingResults.ts, 34, 3))
|
|
>c : Symbol(c, Decl(numericIndexingResults.ts, 6, 3))
|
|
>'1' : Symbol(C.1, Decl(numericIndexingResults.ts, 1, 24))
|
|
|
|
var r2 = c['2'];
|
|
>r2 : Symbol(r2, Decl(numericIndexingResults.ts, 8, 3), Decl(numericIndexingResults.ts, 22, 3), Decl(numericIndexingResults.ts, 35, 3))
|
|
>c : Symbol(c, Decl(numericIndexingResults.ts, 6, 3))
|
|
>'2' : Symbol(C."2", Decl(numericIndexingResults.ts, 2, 11))
|
|
|
|
var r3 = c['3'];
|
|
>r3 : Symbol(r3, Decl(numericIndexingResults.ts, 9, 3), Decl(numericIndexingResults.ts, 23, 3), Decl(numericIndexingResults.ts, 36, 3), Decl(numericIndexingResults.ts, 44, 3), Decl(numericIndexingResults.ts, 52, 3))
|
|
>c : Symbol(c, Decl(numericIndexingResults.ts, 6, 3))
|
|
|
|
var r4 = c[1];
|
|
>r4 : Symbol(r4, Decl(numericIndexingResults.ts, 10, 3), Decl(numericIndexingResults.ts, 24, 3), Decl(numericIndexingResults.ts, 37, 3), Decl(numericIndexingResults.ts, 45, 3), Decl(numericIndexingResults.ts, 53, 3))
|
|
>c : Symbol(c, Decl(numericIndexingResults.ts, 6, 3))
|
|
>1 : Symbol(C.1, Decl(numericIndexingResults.ts, 1, 24))
|
|
|
|
var r5 = c[2];
|
|
>r5 : Symbol(r5, Decl(numericIndexingResults.ts, 11, 3), Decl(numericIndexingResults.ts, 25, 3), Decl(numericIndexingResults.ts, 38, 3), Decl(numericIndexingResults.ts, 46, 3), Decl(numericIndexingResults.ts, 54, 3))
|
|
>c : Symbol(c, Decl(numericIndexingResults.ts, 6, 3))
|
|
>2 : Symbol(C."2", Decl(numericIndexingResults.ts, 2, 11))
|
|
|
|
var r6 = c[3];
|
|
>r6 : Symbol(r6, Decl(numericIndexingResults.ts, 12, 3), Decl(numericIndexingResults.ts, 26, 3), Decl(numericIndexingResults.ts, 39, 3), Decl(numericIndexingResults.ts, 47, 3), Decl(numericIndexingResults.ts, 55, 3))
|
|
>c : Symbol(c, Decl(numericIndexingResults.ts, 6, 3))
|
|
|
|
interface I {
|
|
>I : Symbol(I, Decl(numericIndexingResults.ts, 12, 14))
|
|
|
|
[x: number]: string;
|
|
>x : Symbol(x, Decl(numericIndexingResults.ts, 15, 5))
|
|
|
|
1: string;
|
|
"2": string;
|
|
}
|
|
|
|
var i: I
|
|
>i : Symbol(i, Decl(numericIndexingResults.ts, 20, 3))
|
|
>I : Symbol(I, Decl(numericIndexingResults.ts, 12, 14))
|
|
|
|
var r1 = i['1'];
|
|
>r1 : Symbol(r1, Decl(numericIndexingResults.ts, 7, 3), Decl(numericIndexingResults.ts, 21, 3), Decl(numericIndexingResults.ts, 34, 3))
|
|
>i : Symbol(i, Decl(numericIndexingResults.ts, 20, 3))
|
|
>'1' : Symbol(I.1, Decl(numericIndexingResults.ts, 15, 24))
|
|
|
|
var r2 = i['2'];
|
|
>r2 : Symbol(r2, Decl(numericIndexingResults.ts, 8, 3), Decl(numericIndexingResults.ts, 22, 3), Decl(numericIndexingResults.ts, 35, 3))
|
|
>i : Symbol(i, Decl(numericIndexingResults.ts, 20, 3))
|
|
>'2' : Symbol(I."2", Decl(numericIndexingResults.ts, 16, 14))
|
|
|
|
var r3 = i['3'];
|
|
>r3 : Symbol(r3, Decl(numericIndexingResults.ts, 9, 3), Decl(numericIndexingResults.ts, 23, 3), Decl(numericIndexingResults.ts, 36, 3), Decl(numericIndexingResults.ts, 44, 3), Decl(numericIndexingResults.ts, 52, 3))
|
|
>i : Symbol(i, Decl(numericIndexingResults.ts, 20, 3))
|
|
|
|
var r4 = i[1];
|
|
>r4 : Symbol(r4, Decl(numericIndexingResults.ts, 10, 3), Decl(numericIndexingResults.ts, 24, 3), Decl(numericIndexingResults.ts, 37, 3), Decl(numericIndexingResults.ts, 45, 3), Decl(numericIndexingResults.ts, 53, 3))
|
|
>i : Symbol(i, Decl(numericIndexingResults.ts, 20, 3))
|
|
>1 : Symbol(I.1, Decl(numericIndexingResults.ts, 15, 24))
|
|
|
|
var r5 = i[2];
|
|
>r5 : Symbol(r5, Decl(numericIndexingResults.ts, 11, 3), Decl(numericIndexingResults.ts, 25, 3), Decl(numericIndexingResults.ts, 38, 3), Decl(numericIndexingResults.ts, 46, 3), Decl(numericIndexingResults.ts, 54, 3))
|
|
>i : Symbol(i, Decl(numericIndexingResults.ts, 20, 3))
|
|
>2 : Symbol(I."2", Decl(numericIndexingResults.ts, 16, 14))
|
|
|
|
var r6 = i[3];
|
|
>r6 : Symbol(r6, Decl(numericIndexingResults.ts, 12, 3), Decl(numericIndexingResults.ts, 26, 3), Decl(numericIndexingResults.ts, 39, 3), Decl(numericIndexingResults.ts, 47, 3), Decl(numericIndexingResults.ts, 55, 3))
|
|
>i : Symbol(i, Decl(numericIndexingResults.ts, 20, 3))
|
|
|
|
var a: {
|
|
>a : Symbol(a, Decl(numericIndexingResults.ts, 28, 3))
|
|
|
|
[x: number]: string;
|
|
>x : Symbol(x, Decl(numericIndexingResults.ts, 29, 5))
|
|
|
|
1: string;
|
|
"2": string;
|
|
}
|
|
|
|
var r1 = a['1'];
|
|
>r1 : Symbol(r1, Decl(numericIndexingResults.ts, 7, 3), Decl(numericIndexingResults.ts, 21, 3), Decl(numericIndexingResults.ts, 34, 3))
|
|
>a : Symbol(a, Decl(numericIndexingResults.ts, 28, 3))
|
|
>'1' : Symbol(1, Decl(numericIndexingResults.ts, 29, 24))
|
|
|
|
var r2 = a['2'];
|
|
>r2 : Symbol(r2, Decl(numericIndexingResults.ts, 8, 3), Decl(numericIndexingResults.ts, 22, 3), Decl(numericIndexingResults.ts, 35, 3))
|
|
>a : Symbol(a, Decl(numericIndexingResults.ts, 28, 3))
|
|
>'2' : Symbol("2", Decl(numericIndexingResults.ts, 30, 14))
|
|
|
|
var r3 = a['3'];
|
|
>r3 : Symbol(r3, Decl(numericIndexingResults.ts, 9, 3), Decl(numericIndexingResults.ts, 23, 3), Decl(numericIndexingResults.ts, 36, 3), Decl(numericIndexingResults.ts, 44, 3), Decl(numericIndexingResults.ts, 52, 3))
|
|
>a : Symbol(a, Decl(numericIndexingResults.ts, 28, 3))
|
|
|
|
var r4 = a[1];
|
|
>r4 : Symbol(r4, Decl(numericIndexingResults.ts, 10, 3), Decl(numericIndexingResults.ts, 24, 3), Decl(numericIndexingResults.ts, 37, 3), Decl(numericIndexingResults.ts, 45, 3), Decl(numericIndexingResults.ts, 53, 3))
|
|
>a : Symbol(a, Decl(numericIndexingResults.ts, 28, 3))
|
|
>1 : Symbol(1, Decl(numericIndexingResults.ts, 29, 24))
|
|
|
|
var r5 = a[2];
|
|
>r5 : Symbol(r5, Decl(numericIndexingResults.ts, 11, 3), Decl(numericIndexingResults.ts, 25, 3), Decl(numericIndexingResults.ts, 38, 3), Decl(numericIndexingResults.ts, 46, 3), Decl(numericIndexingResults.ts, 54, 3))
|
|
>a : Symbol(a, Decl(numericIndexingResults.ts, 28, 3))
|
|
>2 : Symbol("2", Decl(numericIndexingResults.ts, 30, 14))
|
|
|
|
var r6 = a[3];
|
|
>r6 : Symbol(r6, Decl(numericIndexingResults.ts, 12, 3), Decl(numericIndexingResults.ts, 26, 3), Decl(numericIndexingResults.ts, 39, 3), Decl(numericIndexingResults.ts, 47, 3), Decl(numericIndexingResults.ts, 55, 3))
|
|
>a : Symbol(a, Decl(numericIndexingResults.ts, 28, 3))
|
|
|
|
var b: { [x: number]: string } = { 1: '', "2": '' }
|
|
>b : Symbol(b, Decl(numericIndexingResults.ts, 41, 3))
|
|
>x : Symbol(x, Decl(numericIndexingResults.ts, 41, 10))
|
|
|
|
var r1a = b['1'];
|
|
>r1a : Symbol(r1a, Decl(numericIndexingResults.ts, 42, 3))
|
|
>b : Symbol(b, Decl(numericIndexingResults.ts, 41, 3))
|
|
|
|
var r2a = b['2'];
|
|
>r2a : Symbol(r2a, Decl(numericIndexingResults.ts, 43, 3))
|
|
>b : Symbol(b, Decl(numericIndexingResults.ts, 41, 3))
|
|
|
|
var r3 = b['3'];
|
|
>r3 : Symbol(r3, Decl(numericIndexingResults.ts, 9, 3), Decl(numericIndexingResults.ts, 23, 3), Decl(numericIndexingResults.ts, 36, 3), Decl(numericIndexingResults.ts, 44, 3), Decl(numericIndexingResults.ts, 52, 3))
|
|
>b : Symbol(b, Decl(numericIndexingResults.ts, 41, 3))
|
|
|
|
var r4 = b[1];
|
|
>r4 : Symbol(r4, Decl(numericIndexingResults.ts, 10, 3), Decl(numericIndexingResults.ts, 24, 3), Decl(numericIndexingResults.ts, 37, 3), Decl(numericIndexingResults.ts, 45, 3), Decl(numericIndexingResults.ts, 53, 3))
|
|
>b : Symbol(b, Decl(numericIndexingResults.ts, 41, 3))
|
|
|
|
var r5 = b[2];
|
|
>r5 : Symbol(r5, Decl(numericIndexingResults.ts, 11, 3), Decl(numericIndexingResults.ts, 25, 3), Decl(numericIndexingResults.ts, 38, 3), Decl(numericIndexingResults.ts, 46, 3), Decl(numericIndexingResults.ts, 54, 3))
|
|
>b : Symbol(b, Decl(numericIndexingResults.ts, 41, 3))
|
|
|
|
var r6 = b[3];
|
|
>r6 : Symbol(r6, Decl(numericIndexingResults.ts, 12, 3), Decl(numericIndexingResults.ts, 26, 3), Decl(numericIndexingResults.ts, 39, 3), Decl(numericIndexingResults.ts, 47, 3), Decl(numericIndexingResults.ts, 55, 3))
|
|
>b : Symbol(b, Decl(numericIndexingResults.ts, 41, 3))
|
|
|
|
var b2: { [x: number]: string; 1: string; "2": string; } = { 1: '', "2": '' }
|
|
>b2 : Symbol(b2, Decl(numericIndexingResults.ts, 49, 3))
|
|
>x : Symbol(x, Decl(numericIndexingResults.ts, 49, 11))
|
|
|
|
var r1b = b2['1'];
|
|
>r1b : Symbol(r1b, Decl(numericIndexingResults.ts, 50, 3))
|
|
>b2 : Symbol(b2, Decl(numericIndexingResults.ts, 49, 3))
|
|
>'1' : Symbol(1, Decl(numericIndexingResults.ts, 49, 30))
|
|
|
|
var r2b = b2['2'];
|
|
>r2b : Symbol(r2b, Decl(numericIndexingResults.ts, 51, 3))
|
|
>b2 : Symbol(b2, Decl(numericIndexingResults.ts, 49, 3))
|
|
>'2' : Symbol("2", Decl(numericIndexingResults.ts, 49, 41))
|
|
|
|
var r3 = b2['3'];
|
|
>r3 : Symbol(r3, Decl(numericIndexingResults.ts, 9, 3), Decl(numericIndexingResults.ts, 23, 3), Decl(numericIndexingResults.ts, 36, 3), Decl(numericIndexingResults.ts, 44, 3), Decl(numericIndexingResults.ts, 52, 3))
|
|
>b2 : Symbol(b2, Decl(numericIndexingResults.ts, 49, 3))
|
|
|
|
var r4 = b2[1];
|
|
>r4 : Symbol(r4, Decl(numericIndexingResults.ts, 10, 3), Decl(numericIndexingResults.ts, 24, 3), Decl(numericIndexingResults.ts, 37, 3), Decl(numericIndexingResults.ts, 45, 3), Decl(numericIndexingResults.ts, 53, 3))
|
|
>b2 : Symbol(b2, Decl(numericIndexingResults.ts, 49, 3))
|
|
>1 : Symbol(1, Decl(numericIndexingResults.ts, 49, 30))
|
|
|
|
var r5 = b2[2];
|
|
>r5 : Symbol(r5, Decl(numericIndexingResults.ts, 11, 3), Decl(numericIndexingResults.ts, 25, 3), Decl(numericIndexingResults.ts, 38, 3), Decl(numericIndexingResults.ts, 46, 3), Decl(numericIndexingResults.ts, 54, 3))
|
|
>b2 : Symbol(b2, Decl(numericIndexingResults.ts, 49, 3))
|
|
>2 : Symbol("2", Decl(numericIndexingResults.ts, 49, 41))
|
|
|
|
var r6 = b2[3];
|
|
>r6 : Symbol(r6, Decl(numericIndexingResults.ts, 12, 3), Decl(numericIndexingResults.ts, 26, 3), Decl(numericIndexingResults.ts, 39, 3), Decl(numericIndexingResults.ts, 47, 3), Decl(numericIndexingResults.ts, 55, 3))
|
|
>b2 : Symbol(b2, Decl(numericIndexingResults.ts, 49, 3))
|
|
|