# Allow arrow functions getters

**URL:** <https://es.discourse.group/t/allow-arrow-functions-getters/930>\
**Category:** 💡 Ideas\
**Created:** [August 16, 2021, 6:18pm UTC](https://es.discourse.group/t/allow-arrow-functions-getters/930 "2021-08-16T18:18:43Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![senocular](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/senocular/32/642_2.png) [@senocular](https://es.discourse.group/u/senocular)\
**Post date:** [August 16, 2021, 7:56pm UTC](https://es.discourse.group/t/allow-arrow-functions-getters/930/4 "2021-08-16T19:56:08Z")

</div>

> [@theScottyJam](#):
>
> Is there a particular scenario where installing the getter on the class instance would be undesirable?

It would overwrite instead of override.

```js
class A {
  get x: () => 1
}
class B extends A {
  get x: () => super.x + 1 // undefined + 1 (B's x overwrites A's x)
}

new B().x // NaN

```

or in the case of being in the base class only, there would be an override but installed by the base class

```js
class A {
  get x: () => 1
}
class B extends A {
  get x() { return 2 }
}

new B().x // 1 (A's instance version overrides version in B's prototype)

```

---

_[View the full topic](https://es.discourse.group/t/allow-arrow-functions-getters/930)._
