class AbstractClass {
constructor() {
}
set property(value) {
this.property_ = value;
}
get property() {
return this.property_
Yes, this is intentional (a part of the spec). If an object has an own property (.property
in your example), this property will be used and not an inherited one. If that property is existent, but is an accessor property without a getter, then undefined
will be returned.
Notice that this behaviour has not changed from ES5.