raulraja
05/15/2020, 8:04 PMmattmoore
05/15/2020, 8:51 PMFudge
05/16/2020, 1:49 PMString | Int
instead of Union2<String, Int>
?fun f(): Union2<String, Union2<Int, Double>> = 2
fun y(): Union3<String, Int, Double> = f()
fun x(): Int? = y()
Shouldn’t x()
produce a type mismatch compilation error since y()
may return types that are not Int?
?Imran/Malic
05/16/2020, 6:06 PMShouldn’tIf they do it simply results in null. That is one of the proofs defined in the prelude.produce a type mismatch compilation error sincex()
may return types that are noty()
?Int?
raulraja
05/16/2020, 6:46 PMImran/Malic
05/16/2020, 6:50 PM