24 lines
No EOL
801 B
Text
24 lines
No EOL
801 B
Text
tests/cases/compiler/classSideInheritance1.ts(12,3): error TS2339: Property 'bar' does not exist on type 'A'.
|
|
tests/cases/compiler/classSideInheritance1.ts(13,3): error TS2339: Property 'bar' does not exist on type 'C2'.
|
|
|
|
|
|
==== tests/cases/compiler/classSideInheritance1.ts (2 errors) ====
|
|
class A {
|
|
static bar(): string {
|
|
return "";
|
|
}
|
|
foo(): number { return 1; }
|
|
}
|
|
|
|
class C2 extends A {}
|
|
|
|
var a: A;
|
|
var c: C2;
|
|
a.bar(); // static off an instance - should be an error
|
|
~~~
|
|
!!! error TS2339: Property 'bar' does not exist on type 'A'.
|
|
c.bar(); // static off an instance - should be an error
|
|
~~~
|
|
!!! error TS2339: Property 'bar' does not exist on type 'C2'.
|
|
A.bar(); // valid
|
|
C2.bar(); // valid |