Record pattern matching returns incorrect result
LightAndLight opened this issue · comments
Program:
f : { x : String, y : String, z : String } -> String
f record =
"${record.x} ${record.y} ${record.z}"
g : { x : String, y : String, z : String } -> String
g record =
case record of
{ x, y, z } -> "$x $y $z"
main : IO ()
main =
comp
println <| f { x = "1", y = "2", z = "3" }
println <| g { x = "1", y = "2", z = "3" }
Expected output:
1 2 3
1 2 3
Actual output:
1 2 3
1 1 1