-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wonky evaluation order for SuperProperty #1175
Comments
It’d be good to know what edge does here. |
I'll try downloading an IE VM. In the meantime, try https://output.jsbin.com/miderik/1/quiet if you already have one. |
Whoo, SauceLabs to the rescue. Edge 16 doesn't throw. |
In that case, it's 50/50, so it could go either way for web compat. How might this change impact future proposals, like decorators or private class methods? |
I agree, resolving |
This is kind of an interesting question. On the one hand, it's inconsistent with member access. On the other, the current behavior is strictly more useful, albeit only in extremely weird cases. Because of those competing values I don't personally care much either way, though I'd lean towards prioritizing the first (i.e., changing the spec to throw for |
As others point out, it does seem very inconsistent to have |
+1 |
Per the spec:
This differs from regular
MemberExpression
:The fact that we evaluate the the inner
[ Expression ]
before evaluating thesuper
feels wrong. I realizesuper.property
isn't really aMemberExpression
, but it looks just like it. This is observable withsuper[super(), "prop"]
, allowing me to initialize the this binding (GetThisEnvironment ().BindThisValue(...)
) even after I've referenced it.Can we move the
env.GetThisBinding()
intoSuperProperty
'sRS: Evaluation
?As for real-world implementations of
super[super(), "prop"]
:🤷♂️NoThe text was updated successfully, but these errors were encountered: