Commit c072de6
test: #5841 — correct misleading doc comment on existing-var test
CodeRabbit review on PR #5855 suggested asserting that a pre-existing
global var's `configurable: false` descriptor survives an eval-triggered
value update. That assertion would fail today: Perry does not yet reify a
top-level *script* `var` declaration as a real `globalThis` own-property
until something touches it via reflection, so `hasOwnProperty` reads
`false` before the eval runs in this test, and the create-if-absent
prelude (correctly, per its own contract) creates a fresh
`configurable: true` binding instead of finding a pre-existing one to
leave alone. That's a separate, pre-existing gap in how Perry models
module-top `var` (tracked by the still-failing test262
`var-env-var-init-global-exstng` case), orthogonal to this PR's
eval-configurable-descriptor fix.
Correct the test's doc comment instead of adding a would-be-failing
assertion, so it no longer overclaims behavior Perry doesn't actually
have yet.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 7aaf06f commit c072de6
1 file changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
114 | 121 | | |
115 | 122 | | |
116 | 123 | | |
| |||
0 commit comments