Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

ensure duplicate names are handled properly #9

Closed
michaelficarra opened this issue Sep 23, 2015 · 1 comment
Closed

ensure duplicate names are handled properly #9

michaelficarra opened this issue Sep 23, 2015 · 1 comment

Comments

@michaelficarra
Copy link
Member

class A {
  b = f();
  b = g();
}

This needs to not error defining b on instances of A twice, and needs to evaluate f() and g() each time A is constructed. The value of fresh instances of A should be the return value of g().

@jeffmo
Copy link
Member

jeffmo commented Aug 15, 2016

Currently, with configurable: false, duplicate properties will error at runtime unless the values are the ===.

configurability is still a topic of debate, but I believe this issue was opened to address an issue with the original design where we could queue a set of instructions to be executed at instantiation time -- where the set was keyed by the property name (i.e. eliminating the execution of f() from ever happening).

This is no longer the case since we no longer store the initialization instructions by the property name

@jeffmo jeffmo closed this as completed Aug 15, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants