Allen Wirfs-Brock (2015-04-21T01:53:40.000Z)
d at domenic.me (2015-05-01T13:03:18.788Z)
On Apr 20, 2015, at 11:55 AM, Rick Waldron wrote: > I understand that, but it struck me as _very_ strange that class with no class heritage could be allowed to have super.foo(), super.foo=2, but not super(). Did I miss something obvious? What is wrote is certainly heavy handed, but not more so than what the spec already does with HasDirectSuper when ClassHeritage is not present. Having just written many tests* for the early errors that will result when HasDirectSuper returns true, it seemed subjectively strange to me that this syntax would even be allowed. I suspect I'm missing something that explains why SuperProperty is allowed where SuperCall is not. remember, `super.x` (LHS or RHS) is a completely different operations than `super()`. The former is semantically a [[Get]] or [[Set]] operation while the latter is a [[Construct]]. Completely different things that happen to both use the same keywords 'super.x' is allowed in any concise method, including those defined in object literals. `super()` is only allowed in class constructors of classes that include a ClassHeritage.