Commit Graph
1 Commits
Author SHA1 Message Date
rajatnagda45 1e11bd6942 fix(lua): resolve colon-method calls (obj:method())
A colon call `obj:method()` parses as a method_index_expression whose
callee is in the `method` field and whose receiver is in the `table`
field, but _LUA_CONFIG read the absent `name` field, so the callee was
never captured and every colon call was dropped from the call graph.

Point the accessor at the right fields and, when the receiver is `self`,
rewrite the bare method name to its enclosing-table label (Animal:method)
so it resolves like any other colon-method definition. An arbitrary-object
receiver (other:m()) is left unqualified and deferred so it cannot bind to
an unrelated same-named bare function.

Fixes #3991

(cherry picked from commit 000b0775c0)
2026-10-02 16:50:45 +01:00