mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 19:52:21 +03:00
13 lines
206 B
TypeScript
13 lines
206 B
TypeScript
|
class Base {
|
||
|
constructor(protected p: number) { }
|
||
|
}
|
||
|
|
||
|
class Derived extends Base {
|
||
|
constructor(public p: number) {
|
||
|
super(p);
|
||
|
this.p; // OK
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var d: Derived;
|
||
|
d.p; // public, OK
|