-
-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
Description
On Julia v1.11.0
julia> function f(a,b,c)
a+b+c
end
f (generic function with 1 method)
julia> f(1,2)
ERROR: MethodError: no method matching f(::Int64, ::Int64)
The function `f` exists, but no method is defined for this combination of argument types.
vs
When using JuliaSyntax
julia> code = """
function f(a,b,c)
a + b + c
end
f(1,2)
"""
"function f(a,b,c)\n a + b + c\nend\nf(1,2)\n"
julia> JuliaSyntax.parseall(SyntaxNode, code)
SyntaxNode:
[toplevel]
[function]
[call]
f :: Identifier
a :: Identifier
b :: Identifier
c :: Identifier
[block]
[call-i]
a :: Identifier
+ :: +
b :: Identifier
c :: Identifier
[call]
f :: Identifier
1 :: Integer
2 :: Integer
When calling a function which lacks some arguments, there should be an error message.
Metadata
Metadata
Assignees
Labels
No labels