bug960.check

来自「JAVA 语言的函数式编程扩展」· CHECK 代码 · 共 11 行

CHECK
11
字号
bug960.scala:18: error: ambiguous reference to overloaded definition,both method unapply in object List of type [a](List[a])Option[Null]and  method unapply in object List of type [a](List[a])Option[(a, List[a])]match argument types (List[a])    case List(x, xs) => 7         ^bug960.scala:12: error: method unapply is defined twice  def unapply[a](xs: List[a]): Option[Null] = xs match {      ^two errors found

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?