oj replaces identifiers with ivars/inlines/globals; however, only identifiers found in non-computed values/objects nodes should be replaced. Assume we have a Foo class with a _foo ivar and an object o:
o._foo // This is the "_foo" key on o
o[_foo] // This uses the ivar _foo
o = { _foo: "foo" }; // This sets the "_foo" key on o to foo
o = { [_foo]: "foo }; // This uses the ivar _foo
This was previously tested in #1, but we need more tests now that ES6 supports computed keys in object literals.
oj replaces identifiers with ivars/inlines/globals; however, only identifiers found in non-computed values/objects nodes should be replaced. Assume we have a Foo class with a _foo ivar and an object
o
:This was previously tested in #1, but we need more tests now that ES6 supports computed keys in object literals.