Closed
Description
Compiler version
3.0.0
Minimized code
case class A(i: Int)
case class B(b: Boolean)
def test =
val (given A) = A(23)
val given B = B(false)
Output
compiles ok
Expectation
val given B
is treated as a pattern val def, but this is too close to given B = B(false)
so I would expect a syntax error in favour of the alias given,
alternatively, with #11897 fixed, it could be a way to define a (non-lazy) given?