You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JS: this.X = function is extracted only inside a function *declaration* — every function-expression form drops it (incomplete fix of #1322) #3408
Title: JS: this.X = function is extracted only inside a function declaration — every function-expression form drops it (incomplete fix of #1322)
Summary
#1322 listed this.x = function(){} "inside any function body" and was closed. In 0.9.56 only one enclosing form works: a named function declaration. If the enclosing function is an expression — assigned to a const, an arrow, an IIFE, or a callback argument — the member is silently dropped.
The callback-argument case is the AngularJS service pattern, so an AngularJS frontend extracts to file nodes only.
A service file with 16 such members yields 0 nodes for them. A named function foo(){} declared inside the same callback is extracted, so the callback body is walked — only the this.X assignment is dropped.
Expected
A node per member, contained by the enclosing function, in every enclosing form. Per #3338, _js_member_assignment_target materializes only exports.X and Foo.prototype.X and other receivers are dropped by the #1077 guard, so this inside a function expression may just need adding to that allowlist alongside the window/globalThis work.
Impact
Measured on one private AngularJS + PHP codebase, 0.9.56, fully rebuilt:
layer
files
nodes
avg/file
contributing only the file node
PHP class layer
844
7913
9.4
1 (0%)
AngularJS frontend
661
1053
1.6
573 (87%)
The class layer extracts essentially completely. The frontend is opaque below file level, so the graph cannot answer "where is this behaviour implemented" for any of it.
Related
#1322 (closed, declaration case only), #2419/#2433 (object-literal shorthand), #3337/#3338 (window/globalThis receiver). Same family, different receiver and enclosing form.
Activity
fix(js): keep this.X = function members in every enclosing-function f…
safishamsi commentedon Sep 9, 2026
Fixed in v0.9.57 by #3423 (thanks @abhay-codes07) — this.X = function members captured in every enclosing-function form. Release: https://github.com/Graphify-Labs/graphify/releases/tag/v0.9.57
fix(js): shadow params of a this.x = function member (#5241)