Scala 2.10 - compiler error?

Is this a compiler error?

class A(val pf: PartialFunction[Int, Int]) class B extends A({ case 5 => 3 case _ => 2 }) println(new B) java.lang.VerifyError: (class: Main$$anon$1$B, method: <init> signature: (LMain$$anon$1;)V) Expecting to find object/array on stack 

I am using Scala 2.10 RC3 and Java 7u9

edit: forgot the "new B" at the end of my code. Without this, an error does not occur

+4
source share
2 answers

Here's an issue that looks pretty similar, including As and Bs. I usually save both for type parameters, since I know that I do not code in Java.

+1
source

Switching to Scala -2.10-RC3 - ​​it works here!

EDIT

 class B extends A (new PartialFunction[Int, Int]{ def apply(v: Int) = v match { case 3 => 4 case _ => 0 } def isDefinedAt(v: Int) = true }) 
-1
source

All Articles