TypeScript/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt

233 lines
15 KiB
Plaintext
Raw Normal View History

2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(21,5): error TS2322: Type 'T' is not assignable to type 'S'.
Property ''1'' is missing in type 'T'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(22,5): error TS2322: Type 'S' is not assignable to type 'T'.
Property ''1.'' is missing in type 'S'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(24,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S'.
Property ''1'' is missing in type '{ '1.0': string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(26,5): error TS2322: Type 'T2' is not assignable to type 'S2'.
Property ''1'' is missing in type 'T2'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2322: Type 'S2' is not assignable to type 'T2'.
Property ''1.0'' is missing in type 'S2'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2322: Type 'T' is not assignable to type 'S2'.
Property ''1'' is missing in type 'T'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2'.
Property ''1'' is missing in type '{ '1.0': string; baz?: string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2'.
Property ''1'' is missing in type '{ '1.0': string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(32,5): error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(33,5): error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }'.
Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(34,5): error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
Property ''1.'' is missing in type 'S'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
Property ''1.'' is missing in type 'S2'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
Property ''1.'' is missing in type '{ '1.0': string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2322: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }'.
Property ''1.0'' is missing in type '{ '1': string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }'.
Property ''1'' is missing in type '{ '1.0': string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }'.
Property ''1.0'' is missing in type 'T'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S'.
Property ''1'' is missing in type '{ '1.0': string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2'.
Property ''1'' is missing in type '{ '1.0': string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(73,5): error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(74,5): error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }'.
Property '1.0' is missing in type '{ '1.': string; bar?: string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(75,5): error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
Property ''1.'' is missing in type 'S'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
Property ''1.'' is missing in type 'S2'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
Property ''1.'' is missing in type '{ '1.0': string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
Property ''1.'' is missing in type '{ 1.: string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }'.
Property ''1.0'' is missing in type '{ 1.: string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(81,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }'.
Property '1.' is missing in type '{ '1.0': string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }'.
Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2322: Type 'T2' is not assignable to type '{ '1.0': string; }'.
Property ''1.0'' is missing in type 'T2'.
2014-11-05 21:26:03 +01:00
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }'.
Property ''1.0'' is missing in type 'T'.
2014-07-13 01:04:16 +02:00
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts (29 errors) ====
// members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M
// string named numeric properties work correctly, errors below unless otherwise noted
module JustStrings {
class S { '1': string; }
class T { '1.': string; }
var s: S;
var t: T;
interface S2 { '1': string; bar?: string }
interface T2 { '1.0': string; baz?: string }
var s2: S2;
var t2: T2;
var a: { '1.': string; bar?: string }
var b: { '1.0': string; baz?: string }
var a2 = { '1.0': '' };
var b2 = { '1': '' };
s = t;
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type 'T' is not assignable to type 'S'.
!!! error TS2322: Property ''1'' is missing in type 'T'.
2014-07-13 01:04:16 +02:00
t = s;
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type 'S' is not assignable to type 'T'.
!!! error TS2322: Property ''1.'' is missing in type 'S'.
2014-07-13 01:04:16 +02:00
s = s2; // ok
s = a2;
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S'.
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
2014-07-13 01:04:16 +02:00
s2 = t2;
~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type 'T2' is not assignable to type 'S2'.
!!! error TS2322: Property ''1'' is missing in type 'T2'.
2014-07-13 01:04:16 +02:00
t2 = s2;
~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type 'S2' is not assignable to type 'T2'.
!!! error TS2322: Property ''1.0'' is missing in type 'S2'.
2014-07-13 01:04:16 +02:00
s2 = t;
~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type 'T' is not assignable to type 'S2'.
!!! error TS2322: Property ''1'' is missing in type 'T'.
2014-07-13 01:04:16 +02:00
s2 = b;
~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2'.
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }'.
2014-07-13 01:04:16 +02:00
s2 = a2;
~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2'.
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
2014-07-13 01:04:16 +02:00
a = b;
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }'.
2014-07-13 01:04:16 +02:00
b = a;
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }'.
!!! error TS2322: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }'.
2014-07-13 01:04:16 +02:00
a = s;
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
!!! error TS2322: Property ''1.'' is missing in type 'S'.
2014-07-13 01:04:16 +02:00
a = s2;
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
!!! error TS2322: Property ''1.'' is missing in type 'S2'.
2014-07-13 01:04:16 +02:00
a = a2;
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; }'.
2014-07-13 01:04:16 +02:00
a2 = b2;
~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }'.
!!! error TS2322: Property ''1.0'' is missing in type '{ '1': string; }'.
2014-07-13 01:04:16 +02:00
b2 = a2;
~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }'.
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
2014-07-13 01:04:16 +02:00
a2 = b; // ok
a2 = t2; // ok
a2 = t;
~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }'.
!!! error TS2322: Property ''1.0'' is missing in type 'T'.
2014-07-13 01:04:16 +02:00
}
module NumbersAndStrings {
class S { '1': string; }
class T { 1: string; }
var s: S;
var t: T;
interface S2 { '1': string; bar?: string }
interface T2 { 1.0: string; baz?: string }
var s2: S2;
var t2: T2;
var a: { '1.': string; bar?: string }
var b: { 1.0: string; baz?: string }
var a2 = { '1.0': '' };
var b2 = { 1.: '' };
s = t; // ok
t = s; // ok
s = s2; // ok
s = a2; // error
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S'.
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
2014-07-13 01:04:16 +02:00
s2 = t2; // ok
t2 = s2; // ok
s2 = t; // ok
s2 = b; // ok
s2 = a2; // error
~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2'.
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
2014-07-13 01:04:16 +02:00
a = b; // error
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
!!! error TS2322: Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }'.
2014-07-13 01:04:16 +02:00
b = a; // error
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }'.
!!! error TS2322: Property '1.0' is missing in type '{ '1.': string; bar?: string; }'.
2014-07-13 01:04:16 +02:00
a = s; // error
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
!!! error TS2322: Property ''1.'' is missing in type 'S'.
2014-07-13 01:04:16 +02:00
a = s2; // error
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
!!! error TS2322: Property ''1.'' is missing in type 'S2'.
2014-07-13 01:04:16 +02:00
a = a2; // error
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; }'.
2014-07-13 01:04:16 +02:00
a = b2; // error
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
!!! error TS2322: Property ''1.'' is missing in type '{ 1.: string; }'.
2014-07-13 01:04:16 +02:00
a2 = b2; // error
~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }'.
!!! error TS2322: Property ''1.0'' is missing in type '{ 1.: string; }'.
2014-07-13 01:04:16 +02:00
b2 = a2; // error
~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }'.
!!! error TS2322: Property '1.' is missing in type '{ '1.0': string; }'.
2014-07-13 01:04:16 +02:00
a2 = b; // error
~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }'.
!!! error TS2322: Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'.
2014-07-13 01:04:16 +02:00
a2 = t2; // error
~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type 'T2' is not assignable to type '{ '1.0': string; }'.
!!! error TS2322: Property ''1.0'' is missing in type 'T2'.
2014-07-13 01:04:16 +02:00
a2 = t; // error
~~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }'.
!!! error TS2322: Property ''1.0'' is missing in type 'T'.
2014-07-13 01:04:16 +02:00
}