kengorab/abra-lang

Issues with typechecking enum variants with default-valued fields

Closed this issue · 0 comments

enum A {
  A1(a = 3)
}

println(A.A1())

This panics in typechecking, due to the way we do "faked" typed arguments when typechecking enum variants with fields, specifically default-valued fields. Curiously,

enum A {
  A1(a: Int = 3)
}

println(A.A1())

doesn't panic