For option types, Perk needs to infer the type of nothing. As it currently is, it sometimes does, sometimes not. Below is an example of a program that doesn't compile:
type Example = Idk
// This doesn't compile yet, even though the type is explicitly annotated
let x: Example? = nothing
// One would expect that at least this should compile, but alas not
let y: Example? = cast(Example?, nothing)
fun main(): void {skip}
For option types, Perk needs to infer the type of
nothing. As it currently is, it sometimes does, sometimes not. Below is an example of a program that doesn't compile: