Open giacomocavalieri opened 8 months ago
In this case, after type inference, the main function ends up having an inferred type with an unbound type variable instead of a generic one:
main
pub type Foo(a) { Foo(value: Int) } pub fn main() { Foo(1) }
Adding a type annotation turns the variable into a generic one though:
// now the inferred type has a generic type variable instead // of an unbound one pub fn main() -> Foo(a) { ... }
Thank you. I believe there are no consequences of this, but it does imply there's an issue with the typer.
In this case, after type inference, the
main
function ends up having an inferred type with an unbound type variable instead of a generic one:Adding a type annotation turns the variable into a generic one though: