fuzion
fuzion copied to clipboard
poor type inference for `outcome.bind`
Type inference in this small example does not work
> ./build/bin/fz -e 'o outcome String := "bla"; ignore (o.bind say)'
command line:1:38: error 1: Failed to infer actual type parameters
o outcome String := "bla"; ignore (o.bind say)
In call to 'outcome.bind', no actual type parameters are given and inference of the type parameters failed.
Expected type parameters: 'B'
Type inference failed for one type parameter 'B'
one error.
adding unit does work
> ./build/bin/fz -e 'o outcome String := "bla"; ignore (o.bind unit say)'
bla
Would be nice if unit could be inferred. If that would work, this would also permit to add infix >>= that results in a different type.