Skip to content

Abstract accessor with implementation#12560

@aozgaa

Description

@aozgaa

TypeScript Version: master, commit 1418fd1

Are abstract getters/setters allowed to have an implementation?

Related: #7184

Code

abstractclassA{private_a: string;abstractgeta(): string{returnthis._a;}abstractseta(newName: string){this._a=newName;}}

Expected behavior:

Error on get and set that abstract getters/setters shouldn't have an implementation.

Actual behavior:

No error.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScript

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions