PageRenderTime 47ms CodeModel.GetById 27ms RepoModel.GetById 0ms app.codeStats 0ms

/test/files/pos/t7853-partial-function.scala

http://github.com/scala/scala
Scala | 7 lines | 6 code | 1 blank | 0 comment | 0 complexity | b04a9dec067a9fd945fa4d3d6550b91e MD5 | raw file
Possible License(s): Apache-2.0, BSD-3-Clause, MIT
  1. object Test {
  2. def testCons: Unit = {
  3. def x[A](a: PartialFunction[Any, A]): A = a(0)
  4. val eval0 = x { case list: List[Int @unchecked] => list }
  5. }
  6. }