Repository navigation
Name functions in signature errors by their call-site name (#116) - #128
Merged
Merged
Conversation
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>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
This change follows jsonata-js:
Signaturethrows T0410 without a name, andevaluateFunctionadds the name used at the call site (seeerr.token = procNamein jsonata-jsevaluateFunction).$test(1)testtesttest($f := $test; $f(1))ftestf($t := |$|{}|; $t(123))t$$Lambda/0x…t$ ~> |$|{}|(input 123)undefined$$Lambda/0x…null(|$|{}|)(123)undefined$$Lambda/0x…nullFunctionNameTestcovers 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