4a59b63f35
* Error for abstract property with initialiser * remove stray LF * update baselines
16 lines
869 B
Plaintext
16 lines
869 B
Plaintext
tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts(2,14): error TS1267: Property 'p' cannot have an initializer because it is marked abstract.
|
|
tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts(5,9): error TS2611: 'p' is defined as a property in class 'A', but is overridden here in 'B' as an accessor.
|
|
|
|
|
|
==== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts (2 errors) ====
|
|
abstract class A {
|
|
abstract p = 'yep'
|
|
~
|
|
!!! error TS1267: Property 'p' cannot have an initializer because it is marked abstract.
|
|
}
|
|
class B extends A {
|
|
get p() { return 'oh no' } // error
|
|
~
|
|
!!! error TS2611: 'p' is defined as a property in class 'A', but is overridden here in 'B' as an accessor.
|
|
}
|
|
|