📄 bug997.scala
字号:
// An extractor with 2 resultsobject Foo { def unapply(x : String) = Some(Pair(x, x)) }object Test extends Application {// Prints 'x'; ought not to compile (or maybe a should be the Pair?)."x" match { case Foo(a) => Console.println(a) }// Prints '(x,x)' as expected."x" match { case Foo(a, b) => Console.println((a,b)) }// Gives confusing error 'not found: value c'."x" match { case Foo(a, b, c) => Console.println((a,b,c)) }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -