Files
tsgo/testdata/baselines/reference/submodule/compiler/classSideInheritance3.symbols

53 lines
1.7 KiB
Plaintext

//// [tests/cases/compiler/classSideInheritance3.ts] ////
=== classSideInheritance3.ts ===
class A {
>A : Symbol(A, Decl(classSideInheritance3.ts, 0, 0))
constructor(public x: string) {
>x : Symbol(A.x, Decl(classSideInheritance3.ts, 1, 16))
}
}
class B extends A {
>B : Symbol(B, Decl(classSideInheritance3.ts, 3, 1))
>A : Symbol(A, Decl(classSideInheritance3.ts, 0, 0))
constructor(x: string, public data: string) {
>x : Symbol(x, Decl(classSideInheritance3.ts, 5, 16))
>data : Symbol(B.data, Decl(classSideInheritance3.ts, 5, 26))
super(x);
>super : Symbol(A, Decl(classSideInheritance3.ts, 0, 0))
>x : Symbol(x, Decl(classSideInheritance3.ts, 5, 16))
}
}
class C extends A {
>C : Symbol(C, Decl(classSideInheritance3.ts, 8, 1))
>A : Symbol(A, Decl(classSideInheritance3.ts, 0, 0))
constructor(x: string) {
>x : Symbol(x, Decl(classSideInheritance3.ts, 10, 16))
super(x);
>super : Symbol(A, Decl(classSideInheritance3.ts, 0, 0))
>x : Symbol(x, Decl(classSideInheritance3.ts, 10, 16))
}
}
var r1: typeof A = B; // error
>r1 : Symbol(r1, Decl(classSideInheritance3.ts, 15, 3))
>A : Symbol(A, Decl(classSideInheritance3.ts, 0, 0))
>B : Symbol(B, Decl(classSideInheritance3.ts, 3, 1))
var r2: new (x: string) => A = B; // error
>r2 : Symbol(r2, Decl(classSideInheritance3.ts, 16, 3))
>x : Symbol(x, Decl(classSideInheritance3.ts, 16, 13))
>A : Symbol(A, Decl(classSideInheritance3.ts, 0, 0))
>B : Symbol(B, Decl(classSideInheritance3.ts, 3, 1))
var r3: typeof A = C; // ok
>r3 : Symbol(r3, Decl(classSideInheritance3.ts, 17, 3))
>A : Symbol(A, Decl(classSideInheritance3.ts, 0, 0))
>C : Symbol(C, Decl(classSideInheritance3.ts, 8, 1))