TypeScript/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.errors.txt
Daniel Rosenwasser 6e77e2e810 Removed colons from diagnostic messages.
Also got rid of the 'terminalMessages' concept.
2014-10-28 00:48:58 -07:00

94 lines
3.7 KiB
Plaintext

tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(16,11): error TS2415: Class 'B' incorrectly extends base class 'A'.
Property 'foo' is private in type 'A' but not in type 'B'.
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(24,11): error TS2415: Class 'B2' incorrectly extends base class 'A2'.
Property '1' is private in type 'A2' but not in type 'B2'.
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(32,11): error TS2415: Class 'B3' incorrectly extends base class 'A3'.
Property ''1'' is private in type 'A3' but not in type 'B3'.
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(42,11): error TS2415: Class 'B' incorrectly extends base class 'A'.
Property 'foo' is private in type 'A' but not in type 'B'.
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(50,11): error TS2415: Class 'B2' incorrectly extends base class 'A2'.
Property '1' is private in type 'A2' but not in type 'B2'.
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts(58,11): error TS2415: Class 'B3' incorrectly extends base class 'A3'.
Property ''1'' is private in type 'A3' but not in type 'B3'.
==== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts (6 errors) ====
// Derived member is private, base member is not causes errors
class Base {
foo: string;
}
class Derived extends Base {
bar: string;
}
module ExplicitPublic {
class A {
private foo: Base;
}
class B extends A {
~
!!! error TS2415: Class 'B' incorrectly extends base class 'A'.
!!! error TS2415: Property 'foo' is private in type 'A' but not in type 'B'.
public foo: Derived; // error
}
class A2 {
private 1: Base;
}
class B2 extends A2 {
~~
!!! error TS2415: Class 'B2' incorrectly extends base class 'A2'.
!!! error TS2415: Property '1' is private in type 'A2' but not in type 'B2'.
public 1: Derived; // error
}
class A3 {
private '1': Base;
}
class B3 extends A3 {
~~
!!! error TS2415: Class 'B3' incorrectly extends base class 'A3'.
!!! error TS2415: Property ''1'' is private in type 'A3' but not in type 'B3'.
public '1': Derived; // error
}
}
module ImplicitPublic {
class A {
private foo: Base;
}
class B extends A {
~
!!! error TS2415: Class 'B' incorrectly extends base class 'A'.
!!! error TS2415: Property 'foo' is private in type 'A' but not in type 'B'.
foo: Derived; // error
}
class A2 {
private 1: Base;
}
class B2 extends A2 {
~~
!!! error TS2415: Class 'B2' incorrectly extends base class 'A2'.
!!! error TS2415: Property '1' is private in type 'A2' but not in type 'B2'.
1: Derived; // error
}
class A3 {
private '1': Base;
}
class B3 extends A3 {
~~
!!! error TS2415: Class 'B3' incorrectly extends base class 'A3'.
!!! error TS2415: Property ''1'' is private in type 'A3' but not in type 'B3'.
'1': Derived; // error
}
}