Skip to content

Commit

Permalink
TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Dec 16, 2023
1 parent 4f729dc commit 5e94388
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5e94388

Please sign in to comment.