Accepting new baselines
This commit is contained in:
parent
c990c4282d
commit
ddfe28db66
|
@ -1,4 +1,4 @@
|
|||
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts(11,16): error TS2341: Property 'clodule.sfn' is inaccessible.
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts(11,16): error TS2341: Property 'sfn' is private and only accessible within class 'clodule<T>'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts (1 errors) ====
|
||||
|
@ -14,7 +14,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMer
|
|||
export function fn<T>(x: T, y: T): number {
|
||||
return clodule.sfn('a');
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2341: Property 'clodule.sfn' is inaccessible.
|
||||
!!! error TS2341: Property 'sfn' is private and only accessible within class 'clodule<T>'.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,14 +2,14 @@ tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(
|
|||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(4,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(8,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(9,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(15,1): error TS2341: Property 'C.x' is inaccessible.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(16,1): error TS2341: Property 'C.y' is inaccessible.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(17,1): error TS2341: Property 'C.y' is inaccessible.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(18,1): error TS2341: Property 'C.foo' is inaccessible.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(20,1): error TS2341: Property 'C.a' is inaccessible.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(21,1): error TS2341: Property 'C.b' is inaccessible.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(22,1): error TS2341: Property 'C.b' is inaccessible.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(23,1): error TS2341: Property 'C.foo' is inaccessible.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(15,1): error TS2341: Property 'x' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(16,1): error TS2341: Property 'y' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(17,1): error TS2341: Property 'y' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(18,1): error TS2341: Property 'foo' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(20,1): error TS2341: Property 'a' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(21,1): error TS2341: Property 'b' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(22,1): error TS2341: Property 'b' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(23,1): error TS2341: Property 'foo' is private and only accessible within class 'C'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts (12 errors) ====
|
||||
|
@ -37,26 +37,26 @@ tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(
|
|||
// all errors
|
||||
c.x;
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.x' is inaccessible.
|
||||
!!! error TS2341: Property 'x' is private and only accessible within class 'C'.
|
||||
c.y;
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.y' is inaccessible.
|
||||
!!! error TS2341: Property 'y' is private and only accessible within class 'C'.
|
||||
c.y = 1;
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.y' is inaccessible.
|
||||
!!! error TS2341: Property 'y' is private and only accessible within class 'C'.
|
||||
c.foo();
|
||||
~~~~~
|
||||
!!! error TS2341: Property 'C.foo' is inaccessible.
|
||||
!!! error TS2341: Property 'foo' is private and only accessible within class 'C'.
|
||||
|
||||
C.a;
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.a' is inaccessible.
|
||||
!!! error TS2341: Property 'a' is private and only accessible within class 'C'.
|
||||
C.b();
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.b' is inaccessible.
|
||||
!!! error TS2341: Property 'b' is private and only accessible within class 'C'.
|
||||
C.b = 1;
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.b' is inaccessible.
|
||||
!!! error TS2341: Property 'b' is private and only accessible within class 'C'.
|
||||
C.foo();
|
||||
~~~~~
|
||||
!!! error TS2341: Property 'C.foo' is inaccessible.
|
||||
!!! error TS2341: Property 'foo' is private and only accessible within class 'C'.
|
|
@ -1,11 +1,11 @@
|
|||
tests/cases/conformance/types/members/classWithPrivateProperty.ts(15,18): error TS2341: Property 'C.x' is inaccessible.
|
||||
tests/cases/conformance/types/members/classWithPrivateProperty.ts(16,18): error TS2341: Property 'C.a' is inaccessible.
|
||||
tests/cases/conformance/types/members/classWithPrivateProperty.ts(17,18): error TS2341: Property 'C.b' is inaccessible.
|
||||
tests/cases/conformance/types/members/classWithPrivateProperty.ts(18,18): error TS2341: Property 'C.c' is inaccessible.
|
||||
tests/cases/conformance/types/members/classWithPrivateProperty.ts(19,18): error TS2341: Property 'C.d' is inaccessible.
|
||||
tests/cases/conformance/types/members/classWithPrivateProperty.ts(20,18): error TS2341: Property 'C.e' is inaccessible.
|
||||
tests/cases/conformance/types/members/classWithPrivateProperty.ts(21,18): error TS2341: Property 'C.f' is inaccessible.
|
||||
tests/cases/conformance/types/members/classWithPrivateProperty.ts(22,18): error TS2341: Property 'C.g' is inaccessible.
|
||||
tests/cases/conformance/types/members/classWithPrivateProperty.ts(15,18): error TS2341: Property 'x' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/types/members/classWithPrivateProperty.ts(16,18): error TS2341: Property 'a' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/types/members/classWithPrivateProperty.ts(17,18): error TS2341: Property 'b' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/types/members/classWithPrivateProperty.ts(18,18): error TS2341: Property 'c' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/types/members/classWithPrivateProperty.ts(19,18): error TS2341: Property 'd' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/types/members/classWithPrivateProperty.ts(20,18): error TS2341: Property 'e' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/types/members/classWithPrivateProperty.ts(21,18): error TS2341: Property 'f' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/types/members/classWithPrivateProperty.ts(22,18): error TS2341: Property 'g' is private and only accessible within class 'C'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/members/classWithPrivateProperty.ts (8 errors) ====
|
||||
|
@ -25,25 +25,25 @@ tests/cases/conformance/types/members/classWithPrivateProperty.ts(22,18): error
|
|||
var c = new C();
|
||||
var r1: string = c.x;
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.x' is inaccessible.
|
||||
!!! error TS2341: Property 'x' is private and only accessible within class 'C'.
|
||||
var r2: string = c.a;
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.a' is inaccessible.
|
||||
!!! error TS2341: Property 'a' is private and only accessible within class 'C'.
|
||||
var r3: string = c.b;
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.b' is inaccessible.
|
||||
!!! error TS2341: Property 'b' is private and only accessible within class 'C'.
|
||||
var r4: string = c.c();
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.c' is inaccessible.
|
||||
!!! error TS2341: Property 'c' is private and only accessible within class 'C'.
|
||||
var r5: string = c.d();
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.d' is inaccessible.
|
||||
!!! error TS2341: Property 'd' is private and only accessible within class 'C'.
|
||||
var r6: string = C.e;
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.e' is inaccessible.
|
||||
!!! error TS2341: Property 'e' is private and only accessible within class 'C'.
|
||||
var r7: string = C.f();
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.f' is inaccessible.
|
||||
!!! error TS2341: Property 'f' is private and only accessible within class 'C'.
|
||||
var r8: string = C.g();
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.g' is inaccessible.
|
||||
!!! error TS2341: Property 'g' is private and only accessible within class 'C'.
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/cloduleStaticMembers.ts(6,13): error TS2341: Property 'Clod.x' is inaccessible.
|
||||
tests/cases/compiler/cloduleStaticMembers.ts(6,13): error TS2341: Property 'x' is private and only accessible within class 'Clod'.
|
||||
tests/cases/compiler/cloduleStaticMembers.ts(7,13): error TS2304: Cannot find name 'x'.
|
||||
tests/cases/compiler/cloduleStaticMembers.ts(10,13): error TS2304: Cannot find name 'y'.
|
||||
|
||||
|
@ -11,7 +11,7 @@ tests/cases/compiler/cloduleStaticMembers.ts(10,13): error TS2304: Cannot find n
|
|||
module Clod {
|
||||
var p = Clod.x;
|
||||
~~~~~~
|
||||
!!! error TS2341: Property 'Clod.x' is inaccessible.
|
||||
!!! error TS2341: Property 'x' is private and only accessible within class 'Clod'.
|
||||
var q = x;
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'x'.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties.ts(8,10): error TS2341: Property 'C.x' is inaccessible.
|
||||
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties.ts(17,10): error TS2341: Property 'D.x' is inaccessible.
|
||||
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties.ts(8,10): error TS2341: Property 'x' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties.ts(17,10): error TS2341: Property 'x' is private and only accessible within class 'D<T>'.
|
||||
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties.ts(18,12): error TS2339: Property 'a' does not exist on type 'D<string>'.
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co
|
|||
var r = c.y;
|
||||
var r2 = c.x; // error
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.x' is inaccessible.
|
||||
!!! error TS2341: Property 'x' is private and only accessible within class 'C'.
|
||||
|
||||
class D<T> {
|
||||
y: T;
|
||||
|
@ -24,7 +24,7 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co
|
|||
var r = d.y;
|
||||
var r2 = d.x; // error
|
||||
~~~
|
||||
!!! error TS2341: Property 'D.x' is inaccessible.
|
||||
!!! error TS2341: Property 'x' is private and only accessible within class 'D<T>'.
|
||||
var r3 = d.a; // error
|
||||
~
|
||||
!!! error TS2339: Property 'a' does not exist on type 'D<string>'.
|
|
@ -4,10 +4,10 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit
|
|||
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(20,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(13,7): error TS2418: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base':
|
||||
Property 'x' is private in type 'typeof Derived' but not in type 'typeof Base'.
|
||||
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(24,10): error TS2341: Property 'Derived.x' is inaccessible.
|
||||
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(27,10): error TS2341: Property 'Derived.fn' is inaccessible.
|
||||
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(32,10): error TS2341: Property 'Derived.a' is inaccessible.
|
||||
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(33,1): error TS2341: Property 'Derived.a' is inaccessible.
|
||||
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(24,10): error TS2341: Property 'x' is private and only accessible within class 'Derived'.
|
||||
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(27,10): error TS2341: Property 'fn' is private and only accessible within class 'Derived'.
|
||||
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(32,10): error TS2341: Property 'a' is private and only accessible within class 'Derived'.
|
||||
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(33,1): error TS2341: Property 'a' is private and only accessible within class 'Derived'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts (9 errors) ====
|
||||
|
@ -47,19 +47,19 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit
|
|||
var r = Base.x; // ok
|
||||
var r2 = Derived.x; // error
|
||||
~~~~~~~~~
|
||||
!!! error TS2341: Property 'Derived.x' is inaccessible.
|
||||
!!! error TS2341: Property 'x' is private and only accessible within class 'Derived'.
|
||||
|
||||
var r3 = Base.fn(); // ok
|
||||
var r4 = Derived.fn(); // error
|
||||
~~~~~~~~~~
|
||||
!!! error TS2341: Property 'Derived.fn' is inaccessible.
|
||||
!!! error TS2341: Property 'fn' is private and only accessible within class 'Derived'.
|
||||
|
||||
var r5 = Base.a; // ok
|
||||
Base.a = 2; // ok
|
||||
|
||||
var r6 = Derived.a; // error
|
||||
~~~~~~~~~
|
||||
!!! error TS2341: Property 'Derived.a' is inaccessible.
|
||||
!!! error TS2341: Property 'a' is private and only accessible within class 'Derived'.
|
||||
Derived.a = 2; // error
|
||||
~~~~~~~~~
|
||||
!!! error TS2341: Property 'Derived.a' is inaccessible.
|
||||
!!! error TS2341: Property 'a' is private and only accessible within class 'Derived'.
|
|
@ -27,13 +27,13 @@ tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess
|
|||
tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(99,19): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(109,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(110,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(111,9): error TS2341: Property 'SomeBase.privateStaticFunc' is inaccessible.
|
||||
tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(111,9): error TS2341: Property 'privateStaticFunc' is private and only accessible within class 'SomeBase'.
|
||||
tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(114,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(115,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(116,9): error TS2341: Property 'SomeBase.privateStaticFunc' is inaccessible.
|
||||
tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(116,9): error TS2341: Property 'privateStaticFunc' is private and only accessible within class 'SomeBase'.
|
||||
tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(120,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(121,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(122,9): error TS2341: Property 'SomeBase.privateStaticFunc' is inaccessible.
|
||||
tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(122,9): error TS2341: Property 'privateStaticFunc' is private and only accessible within class 'SomeBase'.
|
||||
tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(127,16): error TS2335: 'super' can only be referenced in a derived class.
|
||||
tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(127,30): error TS2335: 'super' can only be referenced in a derived class.
|
||||
|
||||
|
@ -205,7 +205,7 @@ tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess
|
|||
!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
super.privateStaticFunc();
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2341: Property 'SomeBase.privateStaticFunc' is inaccessible.
|
||||
!!! error TS2341: Property 'privateStaticFunc' is private and only accessible within class 'SomeBase'.
|
||||
}
|
||||
static get a() {
|
||||
~
|
||||
|
@ -218,7 +218,7 @@ tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess
|
|||
!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
super.privateStaticFunc();
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2341: Property 'SomeBase.privateStaticFunc' is inaccessible.
|
||||
!!! error TS2341: Property 'privateStaticFunc' is private and only accessible within class 'SomeBase'.
|
||||
return '';
|
||||
}
|
||||
static set a(n) {
|
||||
|
@ -232,7 +232,7 @@ tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess
|
|||
!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
super.privateStaticFunc();
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2341: Property 'SomeBase.privateStaticFunc' is inaccessible.
|
||||
!!! error TS2341: Property 'privateStaticFunc' is private and only accessible within class 'SomeBase'.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInte
|
|||
Property 'z' is missing in type 'Bar3'.
|
||||
tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(67,11): error TS2421: Class 'Bar' incorrectly implements interface 'I':
|
||||
Property 'y' is missing in type 'Bar'.
|
||||
tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(73,14): error TS2341: Property 'Foo.x' is inaccessible.
|
||||
tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(73,14): error TS2341: Property 'x' is private and only accessible within class 'Foo'.
|
||||
tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(74,16): error TS2339: Property 'y' does not exist on type 'Bar'.
|
||||
tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts(76,11): error TS2416: Class 'Bar2' incorrectly extends base class 'Foo':
|
||||
Property 'x' is private in type 'Foo' but not in type 'Bar2'.
|
||||
|
@ -130,7 +130,7 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInte
|
|||
var r1 = b.z;
|
||||
var r2 = b.x; // error
|
||||
~~~
|
||||
!!! error TS2341: Property 'Foo.x' is inaccessible.
|
||||
!!! error TS2341: Property 'x' is private and only accessible within class 'Foo'.
|
||||
var r3 = b.y; // error
|
||||
~
|
||||
!!! error TS2339: Property 'y' does not exist on type 'Bar'.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts(5,11): error TS2429: Interface 'I' incorrectly extends interface 'Foo':
|
||||
Property 'x' is private in type 'Foo' but not in type 'I'.
|
||||
tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts(15,10): error TS2341: Property 'Foo.x' is inaccessible.
|
||||
tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts(15,10): error TS2341: Property 'x' is private and only accessible within class 'Foo'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts (2 errors) ====
|
||||
|
@ -23,4 +23,4 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtending
|
|||
var r = i.y;
|
||||
var r2 = i.x; // error
|
||||
~~~
|
||||
!!! error TS2341: Property 'Foo.x' is inaccessible.
|
||||
!!! error TS2341: Property 'x' is private and only accessible within class 'Foo'.
|
|
@ -4,8 +4,8 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtending
|
|||
Property 'x' is private in type 'Bar' but not in type 'I4'.
|
||||
tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(12,11): error TS2429: Interface 'I4' incorrectly extends interface 'Foo':
|
||||
Property 'x' is private in type 'Foo' but not in type 'I4'.
|
||||
tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(26,10): error TS2341: Property 'Foo.x' is inaccessible.
|
||||
tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(27,10): error TS2341: Property 'Baz.y' is inaccessible.
|
||||
tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(26,10): error TS2341: Property 'x' is private and only accessible within class 'Foo'.
|
||||
tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts(27,10): error TS2341: Property 'y' is private and only accessible within class 'Baz'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts (5 errors) ====
|
||||
|
@ -45,7 +45,7 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtending
|
|||
var r: string = i.z;
|
||||
var r2 = i.x; // error
|
||||
~~~
|
||||
!!! error TS2341: Property 'Foo.x' is inaccessible.
|
||||
!!! error TS2341: Property 'x' is private and only accessible within class 'Foo'.
|
||||
var r3 = i.y; // error
|
||||
~~~
|
||||
!!! error TS2341: Property 'Baz.y' is inaccessible.
|
||||
!!! error TS2341: Property 'y' is private and only accessible within class 'Baz'.
|
|
@ -1,7 +1,7 @@
|
|||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(43,9): error TS2341: Property 'C.foo' is inaccessible.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(46,10): error TS2341: Property 'D.foo' is inaccessible.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(48,10): error TS2341: Property 'C.foo' is inaccessible.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(49,10): error TS2341: Property 'D.bar' is inaccessible.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(43,9): error TS2341: Property 'foo' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(46,10): error TS2341: Property 'foo' is private and only accessible within class 'D<T>'.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(48,10): error TS2341: Property 'foo' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts(49,10): error TS2341: Property 'bar' is private and only accessible within class 'D<T>'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts (4 errors) ====
|
||||
|
@ -49,16 +49,16 @@ tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclara
|
|||
var c: C;
|
||||
var r = c.foo(1); // error
|
||||
~~~~~
|
||||
!!! error TS2341: Property 'C.foo' is inaccessible.
|
||||
!!! error TS2341: Property 'foo' is private and only accessible within class 'C'.
|
||||
|
||||
var d: D<number>;
|
||||
var r2 = d.foo(2); // error
|
||||
~~~~~
|
||||
!!! error TS2341: Property 'D.foo' is inaccessible.
|
||||
!!! error TS2341: Property 'foo' is private and only accessible within class 'D<T>'.
|
||||
|
||||
var r3 = C.foo(1); // error
|
||||
~~~~~
|
||||
!!! error TS2341: Property 'C.foo' is inaccessible.
|
||||
!!! error TS2341: Property 'foo' is private and only accessible within class 'C'.
|
||||
var r4 = D.bar(''); // error
|
||||
~~~~~
|
||||
!!! error TS2341: Property 'D.bar' is inaccessible.
|
||||
!!! error TS2341: Property 'bar' is private and only accessible within class 'D<T>'.
|
|
@ -6,8 +6,8 @@ tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclara
|
|||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(27,12): error TS2385: Overload signatures must all be public, private or protected.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(32,19): error TS2385: Overload signatures must all be public, private or protected.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(36,19): error TS2385: Overload signatures must all be public, private or protected.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(42,9): error TS2341: Property 'C.foo' is inaccessible.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(45,10): error TS2341: Property 'D.foo' is inaccessible.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(42,9): error TS2341: Property 'foo' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(45,10): error TS2341: Property 'foo' is private and only accessible within class 'D<T>'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts (10 errors) ====
|
||||
|
@ -70,9 +70,9 @@ tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclara
|
|||
var c: C;
|
||||
var r = c.foo(1); // error
|
||||
~~~~~
|
||||
!!! error TS2341: Property 'C.foo' is inaccessible.
|
||||
!!! error TS2341: Property 'foo' is private and only accessible within class 'C'.
|
||||
|
||||
var d: D<number>;
|
||||
var r2 = d.foo(2); // error
|
||||
~~~~~
|
||||
!!! error TS2341: Property 'D.foo' is inaccessible.
|
||||
!!! error TS2341: Property 'foo' is private and only accessible within class 'D<T>'.
|
|
@ -2,7 +2,7 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheri
|
|||
Types have separate declarations of a private property 'x'.
|
||||
tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts(19,7): error TS2421: Class 'E' incorrectly implements interface 'A':
|
||||
Property 'x' is private in type 'A' but not in type 'E'.
|
||||
tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts(26,9): error TS2341: Property 'C.x' is inaccessible.
|
||||
tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts(26,9): error TS2341: Property 'x' is private and only accessible within class 'C'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts (3 errors) ====
|
||||
|
@ -39,4 +39,4 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheri
|
|||
var a: A;
|
||||
var r = a.x; // error
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.x' is inaccessible.
|
||||
!!! error TS2341: Property 'x' is private and only accessible within class 'C'.
|
|
@ -4,8 +4,8 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheri
|
|||
Property 'w' is private in type 'C2' but not in type 'E'.
|
||||
tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(23,7): error TS2421: Class 'E' incorrectly implements interface 'A':
|
||||
Property 'x' is missing in type 'E'.
|
||||
tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(30,9): error TS2341: Property 'C.x' is inaccessible.
|
||||
tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(31,10): error TS2341: Property 'C2.w' is inaccessible.
|
||||
tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(30,9): error TS2341: Property 'x' is private and only accessible within class 'C'.
|
||||
tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts(31,10): error TS2341: Property 'w' is private and only accessible within class 'C2'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts (5 errors) ====
|
||||
|
@ -49,7 +49,7 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheri
|
|||
var a: A;
|
||||
var r = a.x; // error
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.x' is inaccessible.
|
||||
!!! error TS2341: Property 'x' is private and only accessible within class 'C'.
|
||||
var r2 = a.w; // error
|
||||
~~~
|
||||
!!! error TS2341: Property 'C2.w' is inaccessible.
|
||||
!!! error TS2341: Property 'w' is private and only accessible within class 'C2'.
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/privateAccessInSubclass1.ts(7,5): error TS2341: Property 'Base.options' is inaccessible.
|
||||
tests/cases/compiler/privateAccessInSubclass1.ts(7,5): error TS2341: Property 'options' is private and only accessible within class 'Base'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/privateAccessInSubclass1.ts (1 errors) ====
|
||||
|
@ -10,6 +10,6 @@ tests/cases/compiler/privateAccessInSubclass1.ts(7,5): error TS2341: Property 'B
|
|||
myMethod() {
|
||||
this.options;
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2341: Property 'Base.options' is inaccessible.
|
||||
!!! error TS2341: Property 'options' is private and only accessible within class 'Base'.
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@ tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAcces
|
|||
tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts(6,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts(8,22): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts(10,21): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts(12,8): error TS2341: Property 'Base.foo' is inaccessible.
|
||||
tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts(12,8): error TS2341: Property 'foo' is private and only accessible within class 'Base'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts (6 errors) ====
|
||||
|
@ -30,5 +30,5 @@ tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAcces
|
|||
~~~~
|
||||
!!! error TS1110: Type expected.
|
||||
~~~~~~~~
|
||||
!!! error TS2341: Property 'Base.foo' is inaccessible.
|
||||
!!! error TS2341: Property 'foo' is private and only accessible within class 'Base'.
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
tests/cases/conformance/classes/members/accessibility/privateStaticMemberAccessibility.ts(6,18): error TS2341: Property 'Base.foo' is inaccessible.
|
||||
tests/cases/conformance/classes/members/accessibility/privateStaticMemberAccessibility.ts(7,18): error TS2341: Property 'Base.foo' is inaccessible.
|
||||
tests/cases/conformance/classes/members/accessibility/privateStaticMemberAccessibility.ts(6,18): error TS2341: Property 'foo' is private and only accessible within class 'Base'.
|
||||
tests/cases/conformance/classes/members/accessibility/privateStaticMemberAccessibility.ts(7,18): error TS2341: Property 'foo' is private and only accessible within class 'Base'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/members/accessibility/privateStaticMemberAccessibility.ts (2 errors) ====
|
||||
|
@ -10,8 +10,8 @@ tests/cases/conformance/classes/members/accessibility/privateStaticMemberAccessi
|
|||
class Derived extends Base {
|
||||
static bar = Base.foo; // error
|
||||
~~~~~~~~
|
||||
!!! error TS2341: Property 'Base.foo' is inaccessible.
|
||||
!!! error TS2341: Property 'foo' is private and only accessible within class 'Base'.
|
||||
bing = () => Base.foo; // error
|
||||
~~~~~~~~
|
||||
!!! error TS2341: Property 'Base.foo' is inaccessible.
|
||||
!!! error TS2341: Property 'foo' is private and only accessible within class 'Base'.
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessibleInClodule.ts(9,20): error TS2341: Property 'C.bar' is inaccessible.
|
||||
tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessibleInClodule.ts(9,20): error TS2341: Property 'bar' is private and only accessible within class 'C'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessibleInClodule.ts (1 errors) ====
|
||||
|
@ -12,5 +12,5 @@ tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessible
|
|||
module C {
|
||||
export var y = C.bar; // error
|
||||
~~~~~
|
||||
!!! error TS2341: Property 'C.bar' is inaccessible.
|
||||
!!! error TS2341: Property 'bar' is private and only accessible within class 'C'.
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessibleInClodule2.ts(13,20): error TS2341: Property 'C.bar' is inaccessible.
|
||||
tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessibleInClodule2.ts(13,20): error TS2341: Property 'bar' is private and only accessible within class 'C'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessibleInClodule2.ts (1 errors) ====
|
||||
|
@ -16,5 +16,5 @@ tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessible
|
|||
module D {
|
||||
export var y = D.bar; // error
|
||||
~~~~~
|
||||
!!! error TS2341: Property 'C.bar' is inaccessible.
|
||||
!!! error TS2341: Property 'bar' is private and only accessible within class 'C'.
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
tests/cases/compiler/privateVisibility.ts(9,1): error TS2341: Property 'Foo.privMeth' is inaccessible.
|
||||
tests/cases/compiler/privateVisibility.ts(10,1): error TS2341: Property 'Foo.privProp' is inaccessible.
|
||||
tests/cases/compiler/privateVisibility.ts(24,1): error TS2341: Property 'M.C.priv' is inaccessible.
|
||||
tests/cases/compiler/privateVisibility.ts(9,1): error TS2341: Property 'privMeth' is private and only accessible within class 'Foo'.
|
||||
tests/cases/compiler/privateVisibility.ts(10,1): error TS2341: Property 'privProp' is private and only accessible within class 'Foo'.
|
||||
tests/cases/compiler/privateVisibility.ts(24,1): error TS2341: Property 'priv' is private and only accessible within class 'C'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/privateVisibility.ts (3 errors) ====
|
||||
|
@ -14,10 +14,10 @@ tests/cases/compiler/privateVisibility.ts(24,1): error TS2341: Property 'M.C.pri
|
|||
var f = new Foo();
|
||||
f.privMeth(); // should not work
|
||||
~~~~~~~~~~
|
||||
!!! error TS2341: Property 'Foo.privMeth' is inaccessible.
|
||||
!!! error TS2341: Property 'privMeth' is private and only accessible within class 'Foo'.
|
||||
f.privProp; // should not work
|
||||
~~~~~~~~~~
|
||||
!!! error TS2341: Property 'Foo.privProp' is inaccessible.
|
||||
!!! error TS2341: Property 'privProp' is private and only accessible within class 'Foo'.
|
||||
|
||||
f.pubMeth(); // should work
|
||||
f.pubProp; // should work
|
||||
|
@ -33,6 +33,6 @@ tests/cases/compiler/privateVisibility.ts(24,1): error TS2341: Property 'M.C.pri
|
|||
c.pub; // should work
|
||||
c.priv; // should not work
|
||||
~~~~~~
|
||||
!!! error TS2341: Property 'M.C.priv' is inaccessible.
|
||||
!!! error TS2341: Property 'priv' is private and only accessible within class 'C'.
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/propertyAccessibility1.ts(5,1): error TS2341: Property 'Foo.privProp' is inaccessible.
|
||||
tests/cases/compiler/propertyAccessibility1.ts(5,1): error TS2341: Property 'privProp' is private and only accessible within class 'Foo'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/propertyAccessibility1.ts (1 errors) ====
|
||||
|
@ -8,5 +8,5 @@ tests/cases/compiler/propertyAccessibility1.ts(5,1): error TS2341: Property 'Foo
|
|||
var f = new Foo();
|
||||
f.privProp;
|
||||
~~~~~~~~~~
|
||||
!!! error TS2341: Property 'Foo.privProp' is inaccessible.
|
||||
!!! error TS2341: Property 'privProp' is private and only accessible within class 'Foo'.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/propertyAccessibility2.ts(4,9): error TS2341: Property 'C.x' is inaccessible.
|
||||
tests/cases/compiler/propertyAccessibility2.ts(4,9): error TS2341: Property 'x' is private and only accessible within class 'C'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/propertyAccessibility2.ts (1 errors) ====
|
||||
|
@ -7,5 +7,5 @@ tests/cases/compiler/propertyAccessibility2.ts(4,9): error TS2341: Property 'C.x
|
|||
}
|
||||
var c = C.x;
|
||||
~~~
|
||||
!!! error TS2341: Property 'C.x' is inaccessible.
|
||||
!!! error TS2341: Property 'x' is private and only accessible within class 'C'.
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
tests/cases/compiler/protectedMembers.ts(86,5): error TS1089: 'protected' modifier cannot appear on a constructor declaration.
|
||||
tests/cases/compiler/protectedMembers.ts(40,1): error TS2341: Property 'C1.x' is inaccessible.
|
||||
tests/cases/compiler/protectedMembers.ts(41,1): error TS2341: Property 'C1.f' is inaccessible.
|
||||
tests/cases/compiler/protectedMembers.ts(42,1): error TS2341: Property 'C1.sx' is inaccessible.
|
||||
tests/cases/compiler/protectedMembers.ts(43,1): error TS2341: Property 'C1.sf' is inaccessible.
|
||||
tests/cases/compiler/protectedMembers.ts(46,1): error TS2341: Property 'C1.x' is inaccessible.
|
||||
tests/cases/compiler/protectedMembers.ts(47,1): error TS2341: Property 'C2.f' is inaccessible.
|
||||
tests/cases/compiler/protectedMembers.ts(48,1): error TS2341: Property 'C1.sx' is inaccessible.
|
||||
tests/cases/compiler/protectedMembers.ts(49,1): error TS2341: Property 'C2.sf' is inaccessible.
|
||||
tests/cases/compiler/protectedMembers.ts(68,9): error TS2341: Property 'A.x' is inaccessible.
|
||||
tests/cases/compiler/protectedMembers.ts(69,9): error TS2341: Property 'A.x' is inaccessible.
|
||||
tests/cases/compiler/protectedMembers.ts(40,1): error TS2445: Property 'x' is protected and only accessible within class 'C1' and its subclasses.
|
||||
tests/cases/compiler/protectedMembers.ts(41,1): error TS2445: Property 'f' is protected and only accessible within class 'C1' and its subclasses.
|
||||
tests/cases/compiler/protectedMembers.ts(42,1): error TS2445: Property 'sx' is protected and only accessible within class 'C1' and its subclasses.
|
||||
tests/cases/compiler/protectedMembers.ts(43,1): error TS2445: Property 'sf' is protected and only accessible within class 'C1' and its subclasses.
|
||||
tests/cases/compiler/protectedMembers.ts(46,1): error TS2445: Property 'x' is protected and only accessible within class 'C1' and its subclasses.
|
||||
tests/cases/compiler/protectedMembers.ts(47,1): error TS2445: Property 'f' is protected and only accessible within class 'C2' and its subclasses.
|
||||
tests/cases/compiler/protectedMembers.ts(48,1): error TS2445: Property 'sx' is protected and only accessible within class 'C1' and its subclasses.
|
||||
tests/cases/compiler/protectedMembers.ts(49,1): error TS2445: Property 'sf' is protected and only accessible within class 'C2' and its subclasses.
|
||||
tests/cases/compiler/protectedMembers.ts(68,9): error TS2446: Property 'x' is protected and only accessible through an instance of class 'C'.
|
||||
tests/cases/compiler/protectedMembers.ts(69,9): error TS2446: Property 'x' is protected and only accessible through an instance of class 'C'.
|
||||
tests/cases/compiler/protectedMembers.ts(98,1): error TS2322: Type 'B1' is not assignable to type 'A1':
|
||||
Property 'x' is protected but type 'B1' is not derived from type 'A1'.
|
||||
Property 'x' is protected but type 'B1' is not a class derived from 'A1'.
|
||||
tests/cases/compiler/protectedMembers.ts(99,1): error TS2322: Type 'A1' is not assignable to type 'B1':
|
||||
Property 'x' is protected in type 'A1' but public in type 'B1'.
|
||||
tests/cases/compiler/protectedMembers.ts(112,7): error TS2416: Class 'B3' incorrectly extends base class 'A3':
|
||||
|
@ -59,30 +59,30 @@ tests/cases/compiler/protectedMembers.ts(112,7): error TS2416: Class 'B3' incorr
|
|||
// All of these should be errors
|
||||
c1.x;
|
||||
~~~~
|
||||
!!! error TS2341: Property 'C1.x' is inaccessible.
|
||||
!!! error TS2445: Property 'x' is protected and only accessible within class 'C1' and its subclasses.
|
||||
c1.f();
|
||||
~~~~
|
||||
!!! error TS2341: Property 'C1.f' is inaccessible.
|
||||
!!! error TS2445: Property 'f' is protected and only accessible within class 'C1' and its subclasses.
|
||||
C1.sx;
|
||||
~~~~~
|
||||
!!! error TS2341: Property 'C1.sx' is inaccessible.
|
||||
!!! error TS2445: Property 'sx' is protected and only accessible within class 'C1' and its subclasses.
|
||||
C1.sf();
|
||||
~~~~~
|
||||
!!! error TS2341: Property 'C1.sf' is inaccessible.
|
||||
!!! error TS2445: Property 'sf' is protected and only accessible within class 'C1' and its subclasses.
|
||||
|
||||
// All of these should be errors
|
||||
c2.x;
|
||||
~~~~
|
||||
!!! error TS2341: Property 'C1.x' is inaccessible.
|
||||
!!! error TS2445: Property 'x' is protected and only accessible within class 'C1' and its subclasses.
|
||||
c2.f();
|
||||
~~~~
|
||||
!!! error TS2341: Property 'C2.f' is inaccessible.
|
||||
!!! error TS2445: Property 'f' is protected and only accessible within class 'C2' and its subclasses.
|
||||
C2.sx;
|
||||
~~~~~
|
||||
!!! error TS2341: Property 'C1.sx' is inaccessible.
|
||||
!!! error TS2445: Property 'sx' is protected and only accessible within class 'C1' and its subclasses.
|
||||
C2.sf();
|
||||
~~~~~
|
||||
!!! error TS2341: Property 'C2.sf' is inaccessible.
|
||||
!!! error TS2445: Property 'sf' is protected and only accessible within class 'C2' and its subclasses.
|
||||
|
||||
// All of these should be ok
|
||||
c3.x;
|
||||
|
@ -103,10 +103,10 @@ tests/cases/compiler/protectedMembers.ts(112,7): error TS2416: Class 'B3' incorr
|
|||
static foo(a: A, b: B, c: C, d: D, e: E) {
|
||||
a.x = 1; // Error, access must be through C or type derived from C
|
||||
~~~
|
||||
!!! error TS2341: Property 'A.x' is inaccessible.
|
||||
!!! error TS2446: Property 'x' is protected and only accessible through an instance of class 'C'.
|
||||
b.x = 1; // Error, access must be through C or type derived from C
|
||||
~~~
|
||||
!!! error TS2341: Property 'A.x' is inaccessible.
|
||||
!!! error TS2446: Property 'x' is protected and only accessible through an instance of class 'C'.
|
||||
c.x = 1;
|
||||
d.x = 1;
|
||||
e.x = 1;
|
||||
|
@ -140,7 +140,7 @@ tests/cases/compiler/protectedMembers.ts(112,7): error TS2416: Class 'B3' incorr
|
|||
a1 = b1; // Error, B1 doesn't derive from A1
|
||||
~~
|
||||
!!! error TS2322: Type 'B1' is not assignable to type 'A1':
|
||||
!!! error TS2322: Property 'x' is protected but type 'B1' is not derived from type 'A1'.
|
||||
!!! error TS2322: Property 'x' is protected but type 'B1' is not a class derived from 'A1'.
|
||||
b1 = a1; // Error, x is protected in A1 but public in B1
|
||||
~~
|
||||
!!! error TS2322: Type 'A1' is not assignable to type 'B1':
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
tests/cases/compiler/superPropertyAccess.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/superPropertyAccess.ts(9,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/superPropertyAccess.ts(22,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
tests/cases/compiler/superPropertyAccess.ts(24,9): error TS2341: Property 'MyBase.p1' is inaccessible.
|
||||
tests/cases/compiler/superPropertyAccess.ts(24,9): error TS2341: Property 'p1' is private and only accessible within class 'MyBase'.
|
||||
tests/cases/compiler/superPropertyAccess.ts(26,24): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
tests/cases/compiler/superPropertyAccess.ts(28,24): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
tests/cases/compiler/superPropertyAccess.ts(32,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
||||
|
@ -40,7 +40,7 @@ tests/cases/compiler/superPropertyAccess.ts(34,23): error TS2340: Only public an
|
|||
|
||||
super.p1(); // Should error, private not public instance member function
|
||||
~~~~~~~~
|
||||
!!! error TS2341: Property 'MyBase.p1' is inaccessible.
|
||||
!!! error TS2341: Property 'p1' is private and only accessible within class 'MyBase'.
|
||||
|
||||
var l1 = super.d1; // Should error, instance data property not a public instance member function
|
||||
~~
|
||||
|
|
Loading…
Reference in a new issue