mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
* Fix to issue 6154 - Overriding a method with a property in the derived class should not cause a compiler error * new baselines * fixed deleted baselines
This commit is contained in:
committed by
GitHub
parent
9b9ec6309e
commit
13734e7d68
@@ -1,3 +1,4 @@
|
||||
// @target: es5
|
||||
class a {
|
||||
x() {
|
||||
return "20";
|
||||
@@ -6,9 +7,9 @@ class a {
|
||||
|
||||
class b extends a {
|
||||
get x() {
|
||||
return "20";
|
||||
return () => "20";
|
||||
}
|
||||
set x(aValue: string) {
|
||||
|
||||
set x(aValue) {
|
||||
|
||||
}
|
||||
}
|
||||
9
tests/cases/compiler/propertyOverridingPrototype.ts
Normal file
9
tests/cases/compiler/propertyOverridingPrototype.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
class Base {
|
||||
foo() {
|
||||
}
|
||||
}
|
||||
|
||||
class Derived extends Base {
|
||||
foo: () => { };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user