This produces a type error, as I would expect:
Foo := I64 I64
val : Foo
val = @Foo 1
whereas this type checks just fine:
Bar := Str Str
val : Bar
val = @Bar "foo"
Does anyone know what's going on here?
Parsing bug that ignores the second variable?
» x : Str Str
… x = "test"
"test" : Str
That or we parse correctly, but when type checking realize that Str
can't have a type variable and ignore the type variable passed to it.
Ah yeah that makes sense. Interesting that it isn't an issue with I64
Not sure why it happens to Str
and not I64
. Maybe they are handled diffrently by the type checker. Cause I64
is already an alias?
I64: Num (Integer Signed64)
or something like that. Don't remember exactly how it works
Mm that does sound promising
Last updated: Jul 06 2025 at 12:14 UTC