35 lines
1.5 KiB
Text
35 lines
1.5 KiB
Text
=== tests/cases/conformance/classes/constructorDeclarations/classConstructorParametersAccessibility3.ts ===
|
|
class Base {
|
|
>Base : Symbol(Base, Decl(classConstructorParametersAccessibility3.ts, 0, 0))
|
|
|
|
constructor(protected p: number) { }
|
|
>p : Symbol(p, Decl(classConstructorParametersAccessibility3.ts, 1, 16))
|
|
}
|
|
|
|
class Derived extends Base {
|
|
>Derived : Symbol(Derived, Decl(classConstructorParametersAccessibility3.ts, 2, 1))
|
|
>Base : Symbol(Base, Decl(classConstructorParametersAccessibility3.ts, 0, 0))
|
|
|
|
constructor(public p: number) {
|
|
>p : Symbol(p, Decl(classConstructorParametersAccessibility3.ts, 5, 16))
|
|
|
|
super(p);
|
|
>super : Symbol(Base, Decl(classConstructorParametersAccessibility3.ts, 0, 0))
|
|
>p : Symbol(p, Decl(classConstructorParametersAccessibility3.ts, 5, 16))
|
|
|
|
this.p; // OK
|
|
>this.p : Symbol(p, Decl(classConstructorParametersAccessibility3.ts, 5, 16))
|
|
>this : Symbol(Derived, Decl(classConstructorParametersAccessibility3.ts, 2, 1))
|
|
>p : Symbol(p, Decl(classConstructorParametersAccessibility3.ts, 5, 16))
|
|
}
|
|
}
|
|
|
|
var d: Derived;
|
|
>d : Symbol(d, Decl(classConstructorParametersAccessibility3.ts, 11, 3))
|
|
>Derived : Symbol(Derived, Decl(classConstructorParametersAccessibility3.ts, 2, 1))
|
|
|
|
d.p; // public, OK
|
|
>d.p : Symbol(Derived.p, Decl(classConstructorParametersAccessibility3.ts, 5, 16))
|
|
>d : Symbol(d, Decl(classConstructorParametersAccessibility3.ts, 11, 3))
|
|
>p : Symbol(Derived.p, Decl(classConstructorParametersAccessibility3.ts, 5, 16))
|
|
|