Closed lahma closed 1 year ago
Sorry for meddling with your work but it was faster to me to make the proposed changes than explain them... 😄
Besides some cleanup, my commit fixes some nasty edge cases like
class X extends Y {
constructor() {
var Z = class { get x() { super(); } } // should be rejected
}
}
class X extends Y {
constructor() {
class Z { static { super() } } // should be rejected
}
}
class X extends Y {
constructor() {
class Z extends ZZ { constructor(x = super()) { } } // should be accepted!!!
}
}
class X extends Y {
constructor() {
class Z { x = super() } // should be rejected
}
}
etc.
Also renamed AllowSuperProperty
to AllowSuperAccess
(as suggested by #359) because that sounds a bit more expressive to me. Hope you don't mind.
Please take a look at my changes and if you're ok with them, we can consider this done.
Thanks for the review and improvements! Generally on esprima side I feel even more lost than on Jint side.
I'll gladly swallow my pride and take corrections/insights improving my attempt from peers more educated in the subject, so all good!
I'll try to push some fixes later too and appreciate this kind of help!
I bet you're much more educated in this subject than me... 😄 You and others did the actual heavy-lifting, apart from the JS generator stuff, all I'm doing is just polishing off some rough edges here and there.
I'll try to push some fixes later too and appreciate this kind of help!
Sure thing! Daily job's gonna restart soon, so probably my response time won't be that fast but, of course, I'll gladly help with further refinements as time permits.
AllowSuperCall
andAllowSuperProperty
-super-
as part of their name