Skip to content

Name functions in signature errors by their call-site name (#116) - #128

Merged
uw4 merged 1 commit into
mainfrom
116-bad-function-name-some-time
Nov 4, 2026
Merged

uw4 merged 1 commit into
mainfrom
116-bad-function-name-some-time

Conversation

@aeberhart

Copy link
Copy Markdown
Contributor

Fixes #116

Signature errors (T0410) named functions by a name stored when the function was created. For lambdas such as the transform operator that was the Java class name:

Argument "1" of Object "com.dashjoin.jsonata.Jsonata$$Lambda/0x..." does not match Object signature

This change follows jsonata-js: Signature throws T0410 without a name, and evaluateFunction adds the name used at the call site (see err.token = procName in jsonata-js evaluateFunction).

Expression jsonata-js before after
$test(1) test test test
($f := $test; $f(1)) f test f
($t := |$|{}|; $t(123)) t $$Lambda/0x… t
$ ~> |$|{}| (input 123) undefined $$Lambda/0x… null
(|$|{}|)(123) undefined $$Lambda/0x… null

FunctionNameTest covers these cases. Full suite passes.

Alternative to #117, which passes the name into the function(...) helpers but would still name aliased calls by their registered name.

🤖 Generated with Claude Code

Like jsonata-js, T0410 errors now report the function as it was called
(registered name or variable name) instead of a baked-in name, which for
lambdas such as the transform operator was the Java class name
(Jsonata$$Lambda/0x...). Anonymous functions get no name, matching
jsonata-js's "undefined".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aeberhart
aeberhart requested a review from uw4 November 4, 2026 10:33
@aeberhart aeberhart self-assigned this Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Test Results

1 804 tests  +5   1 801 ✅ +5   6s ⏱️ ±0s
  121 suites +1       3 💤 ±0 
  121 files   +1       0 ❌ ±0 

Results for commit 012231e. ± Comparison against base commit 6b2f23a.

@uw4
uw4 merged commit 99af04a into main Nov 4, 2026
2 checks passed
@aeberhart aeberhart mentioned this pull request Nov 4, 2026
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.

Bad function name some time

2 participants