Closed
Description
Following code compiles fine in scalac but failed to compile in dotty. The cause is mostly like to be unmatched cases when desugaring patdef, as in #1748 .
object Test {
implicit class Foo(sc: StringContext) {
object q {
def unapply(arg: Any): Option[(Any, Any)] =
Some((sc.parts(0), sc.parts(1)))
}
}
def main(args: Array[String]): Unit = {
val q"class ${name: String} extends ${parent: String}" = new Object
println(name)
println(parent)
}
}