mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 15:12:08 +03:00
27 lines
486 B
TypeScript
27 lines
486 B
TypeScript
|
|
class A {
|
|
foo() { return 1; }
|
|
}
|
|
|
|
abstract class B extends A {
|
|
abstract foo();
|
|
bar() { super.foo(); }
|
|
baz() { return this.foo; }
|
|
}
|
|
|
|
class C extends B {
|
|
foo() { return 2; }
|
|
qux() { return super.foo() || super.foo; } // 2 errors, foo is abstract
|
|
norf() { return super.bar(); }
|
|
}
|
|
|
|
class AA {
|
|
foo() { return 1; }
|
|
bar() { return this.foo(); }
|
|
}
|
|
|
|
abstract class BB extends AA {
|
|
abstract foo();
|
|
// inherits bar. But BB is abstract, so this is OK.
|
|
}
|