This approach looks good to me, and seems like CLASS_SCOPE is unnecessary
complication indeed. As discussed offline, this still does not report an
error
in the following case:
class C {
[ o = { m() { ... C ... } }; o.m();] { .... }
}
but that be fixed in a later CL.
I have some test suggestions as well.
https://codereview.chromium.org/968263002/diff/200001/test/mjsunit/strong/declaration-after-use.js
File test/mjsunit/strong/declaration-after-use.js (right):
https://codereview.chromium.org/968263002/diff/200001/test/mjsunit/strong/declaration-after-use.js#newcode146
test/mjsunit/strong/declaration-after-use.js:146: ReferenceError);
Add a test that tests the wrong behavior:
class C {
[ { m() { ... C ... } }; "x"] { .... }
}
with a bug reference
https://codereview.chromium.org/968263002/diff/200001/test/mjsunit/strong/declaration-after-use.js#newcode218
test/mjsunit/strong/declaration-after-use.js:218: let C8 = class C9 {
static method() { C9; } }; new C8();
Add a test for inner class referencing outer class:
class COuter {
m() {
class CInner {
n() {
COuter();
}
}
}
}
Also the same for object literal method
https://codereview.chromium.org/968263002/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.