Open mwookawa opened 4 years ago
This works (when you don't use default parameters):
case class A() {}
case class B(a: A = A())
case class C() { val b = B(A()) }
so the bug is triggered when supplying the default values, which happens at the point of call of the constructor. This also crashes:
object Test {
case class B(a: Int = 0)
def test = {
val b = B()
42
}
}
Also, it looks like it is not in the actual desugaring, but in a prior sanitization phase that does not expect to see this code.
I'm getting inconsistencies in support for defaults in case class constructors. eg, the following crashes stainless with a missing dependency
whereas the following more complex example compiles in stainless without error
Could I get more insight as to why recovery fails for the first example? (but not the second)