1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 16:49:31 +00:00

Error reporting improvements for functions & overloads

This commit is contained in:
Étienne Fildadut 2024-01-06 15:14:15 +01:00
parent 7f71569e07
commit b004946266
20 changed files with 114 additions and 89 deletions

View file

@ -1,12 +1,18 @@
--# run #--
--- error ---
can't call overload overload<($(s::($(x) type(x) == t), k::($(x) <lua function>)) = val; _), ($(s::($(x) type(x) == t), k::($(x) <lua function>)) = val; _), ($(s::($(x) type(x) == t), k::($(x) <lua function>)) _), ($(c::($(x) <lua function>), s::($(x) <lua function>)) = v; <lua function>), ($(c::($(x) <lua function>), s::($(x) <lua function>)) = v; <lua function>), ($(c::($(x) <lua function>), s::($(x) <lua function>)) <lua function>)>: no function match (overload<($(b) _), ($(x) _), ($() _)>, "a"), possible functions were:
• (s::($(x) type(x) == t), k::($(x) <lua function>)) = val: expected 3 arguments, received 2
• (s::($(x) type(x) == t), k::($(x) <lua function>)) = val: expected 3 arguments, received 2
• (s::($(x) type(x) == t), k::($(x) <lua function>)): type check failure for parameter s in function (s::($(x) type(x) == t), k::($(x) <lua function>))
• (c::($(x) <lua function>), s::($(x) <lua function>)) = v: expected 3 arguments, received 2
• (c::($(x) <lua function>), s::($(x) <lua function>)) = v: expected 3 arguments, received 2
• (c::($(x) <lua function>), s::($(x) <lua function>)): type check failure for parameter c in function (c::($(x) <lua function>), s::($(x) <lua function>))
can't call overload _._: no function match arguments (overload([($(b) _), ($(x) _), ($() _)]), "a"), possible functions were:
• $(s::is script, k::is symbol) = val (from stdlib/script.ans:44:1):
expected 3 arguments, received 2
• $(s::is script, k::is string) = val (from stdlib/script.ans:42:1):
expected 3 arguments, received 2
• $(s::is script, k::is string) (from stdlib/script.ans:40:1):
type check failure for parameter s
• $(c::is function, s::is symbol) = v (from test/tests/function separate variable from variants.ans:10:4):
expected 3 arguments, received 2
• $(c::is function, s::is string) = v (from test/tests/function separate variable from variants.ans:10:4):
expected 3 arguments, received 2
• $(c::is function, s::is string) (from test/tests/function separate variable from variants.ans:10:4):
type check failure for parameter c
↳ from test/tests/function separate variable from variants.ans:10:4 in call: f . "a"
↳ from test/tests/function separate variable from variants.ans:10:1 in text interpolation: | {f . "a"} = 2 |
↳ from ? in block: :f = ($() _)…