199 lines
11 KiB
Text
199 lines
11 KiB
Text
=== tests/cases/compiler/privacyTypeParametersOfInterface.ts ===
|
|
class privateClass {
|
|
>privateClass : Symbol(privateClass, Decl(privacyTypeParametersOfInterface.ts, 0, 0))
|
|
}
|
|
|
|
export class publicClass {
|
|
>publicClass : Symbol(publicClass, Decl(privacyTypeParametersOfInterface.ts, 1, 1))
|
|
}
|
|
|
|
class privateClassT<T> {
|
|
>privateClassT : Symbol(privateClassT, Decl(privacyTypeParametersOfInterface.ts, 4, 1))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 6, 20))
|
|
}
|
|
|
|
export class publicClassT<T> {
|
|
>publicClassT : Symbol(publicClassT, Decl(privacyTypeParametersOfInterface.ts, 7, 1))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 9, 26))
|
|
}
|
|
|
|
// TypeParameter_0_of_exported_interface_1_has_or_is_using_private_type_2
|
|
export interface publicInterfaceWithPrivateTypeParameters<T extends privateClass> {
|
|
>publicInterfaceWithPrivateTypeParameters : Symbol(publicInterfaceWithPrivateTypeParameters, Decl(privacyTypeParametersOfInterface.ts, 10, 1))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 13, 58))
|
|
>privateClass : Symbol(privateClass, Decl(privacyTypeParametersOfInterface.ts, 0, 0))
|
|
|
|
myMethod(val: T): T; // Error
|
|
>myMethod : Symbol(myMethod, Decl(privacyTypeParametersOfInterface.ts, 13, 83))
|
|
>val : Symbol(val, Decl(privacyTypeParametersOfInterface.ts, 14, 13))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 13, 58))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 13, 58))
|
|
|
|
myMethod0(): publicClassT<T>; // error
|
|
>myMethod0 : Symbol(myMethod0, Decl(privacyTypeParametersOfInterface.ts, 14, 24))
|
|
>publicClassT : Symbol(publicClassT, Decl(privacyTypeParametersOfInterface.ts, 7, 1))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 13, 58))
|
|
|
|
myMethod1(): privateClassT<privateClass>; // error
|
|
>myMethod1 : Symbol(myMethod1, Decl(privacyTypeParametersOfInterface.ts, 15, 33))
|
|
>privateClassT : Symbol(privateClassT, Decl(privacyTypeParametersOfInterface.ts, 4, 1))
|
|
>privateClass : Symbol(privateClass, Decl(privacyTypeParametersOfInterface.ts, 0, 0))
|
|
|
|
myMethod2(): privateClassT<publicClass>; // error
|
|
>myMethod2 : Symbol(myMethod2, Decl(privacyTypeParametersOfInterface.ts, 16, 45))
|
|
>privateClassT : Symbol(privateClassT, Decl(privacyTypeParametersOfInterface.ts, 4, 1))
|
|
>publicClass : Symbol(publicClass, Decl(privacyTypeParametersOfInterface.ts, 1, 1))
|
|
|
|
myMethod3(): publicClassT<privateClass>; //error
|
|
>myMethod3 : Symbol(myMethod3, Decl(privacyTypeParametersOfInterface.ts, 17, 44))
|
|
>publicClassT : Symbol(publicClassT, Decl(privacyTypeParametersOfInterface.ts, 7, 1))
|
|
>privateClass : Symbol(privateClass, Decl(privacyTypeParametersOfInterface.ts, 0, 0))
|
|
|
|
myMethod4(): publicClassT<publicClass>; // no error
|
|
>myMethod4 : Symbol(myMethod4, Decl(privacyTypeParametersOfInterface.ts, 18, 44))
|
|
>publicClassT : Symbol(publicClassT, Decl(privacyTypeParametersOfInterface.ts, 7, 1))
|
|
>publicClass : Symbol(publicClass, Decl(privacyTypeParametersOfInterface.ts, 1, 1))
|
|
}
|
|
|
|
export interface publicInterfaceWithPublicTypeParameters<T extends publicClass> {
|
|
>publicInterfaceWithPublicTypeParameters : Symbol(publicInterfaceWithPublicTypeParameters, Decl(privacyTypeParametersOfInterface.ts, 20, 1))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 22, 57))
|
|
>publicClass : Symbol(publicClass, Decl(privacyTypeParametersOfInterface.ts, 1, 1))
|
|
|
|
myMethod(val: T): T; // No Error
|
|
>myMethod : Symbol(myMethod, Decl(privacyTypeParametersOfInterface.ts, 22, 81))
|
|
>val : Symbol(val, Decl(privacyTypeParametersOfInterface.ts, 23, 13))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 22, 57))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 22, 57))
|
|
|
|
myMethod0(): publicClassT<T>; // No error
|
|
>myMethod0 : Symbol(myMethod0, Decl(privacyTypeParametersOfInterface.ts, 23, 24))
|
|
>publicClassT : Symbol(publicClassT, Decl(privacyTypeParametersOfInterface.ts, 7, 1))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 22, 57))
|
|
|
|
myMethod1(): privateClassT<privateClass>; // error
|
|
>myMethod1 : Symbol(myMethod1, Decl(privacyTypeParametersOfInterface.ts, 24, 33))
|
|
>privateClassT : Symbol(privateClassT, Decl(privacyTypeParametersOfInterface.ts, 4, 1))
|
|
>privateClass : Symbol(privateClass, Decl(privacyTypeParametersOfInterface.ts, 0, 0))
|
|
|
|
myMethod2(): privateClassT<publicClass>; // error
|
|
>myMethod2 : Symbol(myMethod2, Decl(privacyTypeParametersOfInterface.ts, 25, 45))
|
|
>privateClassT : Symbol(privateClassT, Decl(privacyTypeParametersOfInterface.ts, 4, 1))
|
|
>publicClass : Symbol(publicClass, Decl(privacyTypeParametersOfInterface.ts, 1, 1))
|
|
|
|
myMethod3(): publicClassT<privateClass>; //error
|
|
>myMethod3 : Symbol(myMethod3, Decl(privacyTypeParametersOfInterface.ts, 26, 44))
|
|
>publicClassT : Symbol(publicClassT, Decl(privacyTypeParametersOfInterface.ts, 7, 1))
|
|
>privateClass : Symbol(privateClass, Decl(privacyTypeParametersOfInterface.ts, 0, 0))
|
|
|
|
myMethod4(): publicClassT<publicClass>; // no error
|
|
>myMethod4 : Symbol(myMethod4, Decl(privacyTypeParametersOfInterface.ts, 27, 44))
|
|
>publicClassT : Symbol(publicClassT, Decl(privacyTypeParametersOfInterface.ts, 7, 1))
|
|
>publicClass : Symbol(publicClass, Decl(privacyTypeParametersOfInterface.ts, 1, 1))
|
|
}
|
|
|
|
interface privateInterfaceWithPrivateTypeParameters<T extends privateClass> {
|
|
>privateInterfaceWithPrivateTypeParameters : Symbol(privateInterfaceWithPrivateTypeParameters, Decl(privacyTypeParametersOfInterface.ts, 29, 1))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 31, 52))
|
|
>privateClass : Symbol(privateClass, Decl(privacyTypeParametersOfInterface.ts, 0, 0))
|
|
|
|
myMethod(val: T): T; // No Error
|
|
>myMethod : Symbol(myMethod, Decl(privacyTypeParametersOfInterface.ts, 31, 77))
|
|
>val : Symbol(val, Decl(privacyTypeParametersOfInterface.ts, 32, 13))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 31, 52))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 31, 52))
|
|
|
|
myMethod0(): publicClassT<T>; // No error
|
|
>myMethod0 : Symbol(myMethod0, Decl(privacyTypeParametersOfInterface.ts, 32, 24))
|
|
>publicClassT : Symbol(publicClassT, Decl(privacyTypeParametersOfInterface.ts, 7, 1))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 31, 52))
|
|
|
|
myMethod1(): privateClassT<privateClass>; // No error
|
|
>myMethod1 : Symbol(myMethod1, Decl(privacyTypeParametersOfInterface.ts, 33, 33))
|
|
>privateClassT : Symbol(privateClassT, Decl(privacyTypeParametersOfInterface.ts, 4, 1))
|
|
>privateClass : Symbol(privateClass, Decl(privacyTypeParametersOfInterface.ts, 0, 0))
|
|
|
|
myMethod2(): privateClassT<publicClass>; // No error
|
|
>myMethod2 : Symbol(myMethod2, Decl(privacyTypeParametersOfInterface.ts, 34, 45))
|
|
>privateClassT : Symbol(privateClassT, Decl(privacyTypeParametersOfInterface.ts, 4, 1))
|
|
>publicClass : Symbol(publicClass, Decl(privacyTypeParametersOfInterface.ts, 1, 1))
|
|
|
|
myMethod3(): publicClassT<privateClass>; //No error
|
|
>myMethod3 : Symbol(myMethod3, Decl(privacyTypeParametersOfInterface.ts, 35, 44))
|
|
>publicClassT : Symbol(publicClassT, Decl(privacyTypeParametersOfInterface.ts, 7, 1))
|
|
>privateClass : Symbol(privateClass, Decl(privacyTypeParametersOfInterface.ts, 0, 0))
|
|
|
|
myMethod4(): publicClassT<publicClass>; // no error
|
|
>myMethod4 : Symbol(myMethod4, Decl(privacyTypeParametersOfInterface.ts, 36, 44))
|
|
>publicClassT : Symbol(publicClassT, Decl(privacyTypeParametersOfInterface.ts, 7, 1))
|
|
>publicClass : Symbol(publicClass, Decl(privacyTypeParametersOfInterface.ts, 1, 1))
|
|
}
|
|
|
|
interface privateInterfaceWithPublicTypeParameters<T extends publicClass> {
|
|
>privateInterfaceWithPublicTypeParameters : Symbol(privateInterfaceWithPublicTypeParameters, Decl(privacyTypeParametersOfInterface.ts, 38, 1))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 40, 51))
|
|
>publicClass : Symbol(publicClass, Decl(privacyTypeParametersOfInterface.ts, 1, 1))
|
|
|
|
myMethod(val: T): T; // No Error
|
|
>myMethod : Symbol(myMethod, Decl(privacyTypeParametersOfInterface.ts, 40, 75))
|
|
>val : Symbol(val, Decl(privacyTypeParametersOfInterface.ts, 41, 13))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 40, 51))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 40, 51))
|
|
|
|
myMethod0(): publicClassT<T>; // No error
|
|
>myMethod0 : Symbol(myMethod0, Decl(privacyTypeParametersOfInterface.ts, 41, 24))
|
|
>publicClassT : Symbol(publicClassT, Decl(privacyTypeParametersOfInterface.ts, 7, 1))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 40, 51))
|
|
|
|
myMethod1(): privateClassT<privateClass>; // No error
|
|
>myMethod1 : Symbol(myMethod1, Decl(privacyTypeParametersOfInterface.ts, 42, 33))
|
|
>privateClassT : Symbol(privateClassT, Decl(privacyTypeParametersOfInterface.ts, 4, 1))
|
|
>privateClass : Symbol(privateClass, Decl(privacyTypeParametersOfInterface.ts, 0, 0))
|
|
|
|
myMethod2(): privateClassT<publicClass>; // No error
|
|
>myMethod2 : Symbol(myMethod2, Decl(privacyTypeParametersOfInterface.ts, 43, 45))
|
|
>privateClassT : Symbol(privateClassT, Decl(privacyTypeParametersOfInterface.ts, 4, 1))
|
|
>publicClass : Symbol(publicClass, Decl(privacyTypeParametersOfInterface.ts, 1, 1))
|
|
|
|
myMethod3(): publicClassT<privateClass>; //No error
|
|
>myMethod3 : Symbol(myMethod3, Decl(privacyTypeParametersOfInterface.ts, 44, 44))
|
|
>publicClassT : Symbol(publicClassT, Decl(privacyTypeParametersOfInterface.ts, 7, 1))
|
|
>privateClass : Symbol(privateClass, Decl(privacyTypeParametersOfInterface.ts, 0, 0))
|
|
|
|
myMethod4(): publicClassT<publicClass>; // no error
|
|
>myMethod4 : Symbol(myMethod4, Decl(privacyTypeParametersOfInterface.ts, 45, 44))
|
|
>publicClassT : Symbol(publicClassT, Decl(privacyTypeParametersOfInterface.ts, 7, 1))
|
|
>publicClass : Symbol(publicClass, Decl(privacyTypeParametersOfInterface.ts, 1, 1))
|
|
}
|
|
|
|
export interface publicInterfaceWithPublicTypeParametersWithoutExtends<T> {
|
|
>publicInterfaceWithPublicTypeParametersWithoutExtends : Symbol(publicInterfaceWithPublicTypeParametersWithoutExtends, Decl(privacyTypeParametersOfInterface.ts, 47, 1))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 49, 71))
|
|
|
|
myMethod(val: T): T; // No Error
|
|
>myMethod : Symbol(myMethod, Decl(privacyTypeParametersOfInterface.ts, 49, 75))
|
|
>val : Symbol(val, Decl(privacyTypeParametersOfInterface.ts, 50, 13))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 49, 71))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 49, 71))
|
|
|
|
myMethod0(): publicClassT<T>; // No error
|
|
>myMethod0 : Symbol(myMethod0, Decl(privacyTypeParametersOfInterface.ts, 50, 24))
|
|
>publicClassT : Symbol(publicClassT, Decl(privacyTypeParametersOfInterface.ts, 7, 1))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 49, 71))
|
|
}
|
|
|
|
interface privateInterfaceWithPublicTypeParametersWithoutExtends<T> {
|
|
>privateInterfaceWithPublicTypeParametersWithoutExtends : Symbol(privateInterfaceWithPublicTypeParametersWithoutExtends, Decl(privacyTypeParametersOfInterface.ts, 52, 1))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 54, 65))
|
|
|
|
myMethod(val: T): T; // No Error
|
|
>myMethod : Symbol(myMethod, Decl(privacyTypeParametersOfInterface.ts, 54, 69))
|
|
>val : Symbol(val, Decl(privacyTypeParametersOfInterface.ts, 55, 13))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 54, 65))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 54, 65))
|
|
|
|
myMethod0(): publicClassT<T>; // No error
|
|
>myMethod0 : Symbol(myMethod0, Decl(privacyTypeParametersOfInterface.ts, 55, 24))
|
|
>publicClassT : Symbol(publicClassT, Decl(privacyTypeParametersOfInterface.ts, 7, 1))
|
|
>T : Symbol(T, Decl(privacyTypeParametersOfInterface.ts, 54, 65))
|
|
}
|