Currently type widening only works for "one level" and does not support nesting. This is a problem for the typesystem, and also prevents #673 from being merged since the expected type of arithmetic functions is float | int, which an integer literal is not directly part of.
This will require either a pass to flatten all of our multitypes or doing some recursive set checks when going through the checker pass. I think the flattening pass is easier, but it will also be more memory hungry
Currently type widening only works for "one level" and does not support nesting. This is a problem for the typesystem, and also prevents #673 from being merged since the expected type of arithmetic functions is
float | int
, which an integer literal is not directly part of.This will require either a pass to flatten all of our multitypes or doing some recursive set checks when going through the
checker
pass. I think the flattening pass is easier, but it will also be more memory hungry