124 lines
5.4 KiB
Text
124 lines
5.4 KiB
Text
=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersNumericNames.ts ===
|
|
// members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M
|
|
// numeric named properties work correctly, no errors expected
|
|
|
|
class S { 1: string; }
|
|
>S : Symbol(S, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 0, 0))
|
|
|
|
class T { 1.: string; }
|
|
>T : Symbol(T, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 3, 22))
|
|
|
|
var s: S;
|
|
>s : Symbol(s, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 5, 3))
|
|
>S : Symbol(S, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 0, 0))
|
|
|
|
var t: T;
|
|
>t : Symbol(t, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 6, 3))
|
|
>T : Symbol(T, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 3, 22))
|
|
|
|
interface S2 { 1: string; bar?: string }
|
|
>S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 6, 9))
|
|
>bar : Symbol(bar, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 8, 25))
|
|
|
|
interface T2 { 1.0: string; baz?: string }
|
|
>T2 : Symbol(T2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 8, 40))
|
|
>baz : Symbol(baz, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 9, 27))
|
|
|
|
var s2: S2;
|
|
>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 10, 3))
|
|
>S2 : Symbol(S2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 6, 9))
|
|
|
|
var t2: T2;
|
|
>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 11, 3))
|
|
>T2 : Symbol(T2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 8, 40))
|
|
|
|
var a: { 1.: string; bar?: string }
|
|
>a : Symbol(a, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 13, 3))
|
|
>bar : Symbol(bar, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 13, 20))
|
|
|
|
var b: { 1.0: string; baz?: string }
|
|
>b : Symbol(b, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 14, 3))
|
|
>baz : Symbol(baz, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 14, 21))
|
|
|
|
var a2 = { 1.0: '' };
|
|
>a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 16, 3))
|
|
|
|
var b2 = { 1: '' };
|
|
>b2 : Symbol(b2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 17, 3))
|
|
|
|
s = t;
|
|
>s : Symbol(s, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 5, 3))
|
|
>t : Symbol(t, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 6, 3))
|
|
|
|
t = s;
|
|
>t : Symbol(t, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 6, 3))
|
|
>s : Symbol(s, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 5, 3))
|
|
|
|
s = s2;
|
|
>s : Symbol(s, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 5, 3))
|
|
>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 10, 3))
|
|
|
|
s = a2;
|
|
>s : Symbol(s, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 5, 3))
|
|
>a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 16, 3))
|
|
|
|
s2 = t2;
|
|
>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 10, 3))
|
|
>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 11, 3))
|
|
|
|
t2 = s2;
|
|
>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 11, 3))
|
|
>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 10, 3))
|
|
|
|
s2 = t;
|
|
>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 10, 3))
|
|
>t : Symbol(t, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 6, 3))
|
|
|
|
s2 = b;
|
|
>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 10, 3))
|
|
>b : Symbol(b, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 14, 3))
|
|
|
|
s2 = a2;
|
|
>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 10, 3))
|
|
>a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 16, 3))
|
|
|
|
a = b;
|
|
>a : Symbol(a, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 13, 3))
|
|
>b : Symbol(b, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 14, 3))
|
|
|
|
b = a;
|
|
>b : Symbol(b, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 14, 3))
|
|
>a : Symbol(a, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 13, 3))
|
|
|
|
a = s;
|
|
>a : Symbol(a, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 13, 3))
|
|
>s : Symbol(s, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 5, 3))
|
|
|
|
a = s2;
|
|
>a : Symbol(a, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 13, 3))
|
|
>s2 : Symbol(s2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 10, 3))
|
|
|
|
a = a2;
|
|
>a : Symbol(a, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 13, 3))
|
|
>a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 16, 3))
|
|
|
|
a2 = b2;
|
|
>a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 16, 3))
|
|
>b2 : Symbol(b2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 17, 3))
|
|
|
|
b2 = a2;
|
|
>b2 : Symbol(b2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 17, 3))
|
|
>a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 16, 3))
|
|
|
|
a2 = b;
|
|
>a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 16, 3))
|
|
>b : Symbol(b, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 14, 3))
|
|
|
|
a2 = t2;
|
|
>a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 16, 3))
|
|
>t2 : Symbol(t2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 11, 3))
|
|
|
|
a2 = t;
|
|
>a2 : Symbol(a2, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 16, 3))
|
|
>t : Symbol(t, Decl(assignmentCompatWithObjectMembersNumericNames.ts, 6, 3))
|
|
|