1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-28 09:09: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,14 +1,18 @@
--# run #--
--- error ---
can't call overload overload<($(table::($(x) <lua function>)) _), ($(tuple::($(x) type(x) == "tuple" | type(x) == "list")) _), ($(range::($(x) type(x) == t)) _), ($(s::($(x) <lua function>)) <lua function>)>: no function match (42), possible functions were:
• (table::($(x) <lua function>)): type check failure for parameter table in function (table::($(x) <lua function>))
• (tuple::($(x) type(x) == "tuple" | type(x) == "list")): type check failure for parameter tuple in function (tuple::($(x) type(x) == "tuple" | type(x) == "list"))
• (range::($(x) type(x) == t)): type check failure for parameter range in function (range::($(x) type(x) == t))
• (s::($(x) <lua function>)): type check failure for parameter s in function (s::($(x) <lua function>))
↳ from for.ans:3:18 in call: iter(var)
↳ from for.ans:3:12 in definition: :iterator = iter(var)
↳ from for.ans:2:1 in block: :iterator = iter(var)…
↳ from for.ans:2:68 in call: _
can't call overload iter: no function match arguments (42), possible functions were:
• $(table::is table) (from stdlib/for.ans:46:1):
type check failure for parameter table
• $(tuple::is sequence) (from stdlib/for.ans:37:1):
type check failure for parameter tuple
• $(range::is range) (from stdlib/for.ans:19:1):
type check failure for parameter range
• $(s::is struct) (from stdlib/for.ans:3:14):
type check failure for parameter s
↳ from stdlib/for.ans:3:18 in call: iter(var)
↳ from stdlib/for.ans:3:12 in definition: :iterator = iter(var)
↳ from stdlib/for.ans:2:1 in block: :iterator = iter(var)…
↳ from stdlib/for.ans:2:71 in call: _
↳ from test/tests/for invalid iterator.ans:1:4 in call: for(:x, 42)
↳ from ? in block: for(:x, 42)…
--# saved #--