为什么打印wtf?模式匹配不适用于结构类型吗?
"hello" match { case s: { def doesNotExist(i: Int, x: List[_]): Double } => println("wtf?") case _ => println("okie dokie") }
scala pattern-matching structural-typing
pattern-matching ×1
scala ×1
structural-typing ×1