Skip to content

javascript: this.x() with no declared x answers unknown in path - #1724

Merged
swapnilpaliwal-sd merged 1 commit into
0.1.7from
loop/ja-is1709
Sep 29, 2026
Merged

swapnilpaliwal-sd merged 1 commit into
0.1.7from
loop/ja-is1709

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor

path A B answered "independent" when A calls this.x() and x is only put on the instance from outside the class (e.hook = fn, Object.assign(this, opts)).

  • JS engine: such a call is now an unresolved value callee (instance_member); path answers UNKNOWN and names the site.
  • Left out: a declared method, a class whose base the graph cannot resolve, ambient members (hasOwnProperty); this.x = x keeps its field reading.
  • Golden case 68-instance-member-callee and CLI case instance-member-callee-is-unknown with those controls.

Checked: JS golden suite 76/76; new CLI case 6/6 (2 fail on 0.1.7); call edges and value-callee counts identical before/after on 6 real JS apps + 4 synthetic corpora. 3 JS CLI cases fail on 0.1.7 with or without this change.

Closes #1709

…swers unknown

A method calling this.hook() where neither the class, an ancestor nor any
write the graph follows gives the instance a hook runs a function stored
from outside (e.hook = fn, Object.assign(this, opts)). It is now an
unresolved value callee (instance_member), so path says unknown and names
the site instead of independent. Classes with an unresolved or dynamic base
are left out, as are ambient members (hasOwnProperty).

Closes #1709

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit 1c4e6e5 into 0.1.7 Sep 29, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the loop/ja-is1709 branch September 29, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant