From 5e94388f93f7efa81bf2044722a218e1a41fa27a Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Sat, 16 Dec 2023 02:06:25 +0000 Subject: [PATCH] TODO --- TODO.md | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/TODO.md b/TODO.md index 5cccd001..cfd2fcf1 100644 --- a/TODO.md +++ b/TODO.md @@ -7,39 +7,6 @@ * Tests for `with` in `eval()` * Tests for `this` where implicitly used by `super()` and `super` -* Fix proxy preventing correct `this` being passed to method calls - -This prints 'true' in original, but 'false' once instrumented: - -```js -const obj = { - foo() { - console.log(this === obj); - } -}; -with (obj) { - foo(); -} -``` - -This should print '1,2,3' but prints '[object Undefined]': - -```js -with ([1, 2, 3]) { - console.log(toString()); -} -``` - -Also affects primitives: - -```js -with (123) { - console.log(toString()); -} -``` - -Should print '123', but instead throws error. The proxy that `with` expression is replaced with is passed to `Number.prototype.toString` as `this` and it throws `TypeError: Number.prototype.toString requires that 'this' be a Number`. - * Raise Github issue for interaction with const violations e.g. How to deal with this? Whether `x = 2` is a const violation depends on whether `obj` has a property called `x` or not.