Handle inference of multiple size for `Int` literals
Champii opened this issue · 1 comments
Champii commented
We currently only support Int64
when inferring integer literals.
We need a way to have a "generic" int that is either bound by constraints when used in the program or defaulting to Int64 if no particular need is expressed.
This fails with a type error between the 10
number literal that is an Int64 and the bar
field that requires an Int16
struct Foo
bar: Int16
main: ->
let foo = Foo bar: 10
foo.bar
Champii commented
We might need a proper type inference system with sub-typing support