fuzion
fuzion copied to clipboard
`id` called with two arguments results in wrong number of actual arguments
This is related to #3658, but maybe has a different root cause. This works
> ./build/bin/fz -e "s := id (Unary i32 (array i32)) sum; say (s <| [1,2])"
3
while replacing s by id (Unary i32 (array i32)) sum causes an unjustified error about id called with two arguments while it expects two arguments:
> ./build/bin/fz -e "say ((id (Unary i32 (array i32)) sum) <| [1,2])"
command line:1:7: error 1: Wrong number of actual arguments in call
say ((id (Unary i32 (array i32)) sum) <| [1,2])
Number of actual arguments is 2, while call expects one argument.
Called feature: 'id'
Formal arguments: 'x' 'Unary i32 (array i32)'
Declared at $MODULE/id.fz:31:8:
public id(T type, x T) T => x