Welcome to Scala version 2.11.0-M3 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_45).
Type in expressions to have them evaluated.
Type :help for more information.
scala> trait X extends scala.concurrent.ExecutionContext { val name = "" }
<console>:7: error: overriding value name in trait ExecutionContext of type String;
value name needs `override' modifier
trait X extends scala.concurrent.ExecutionContext { val name = "" }
^
scala> trait X extends scala.concurrent.ExecutionContext { val namen = "" }
defined trait X
For those of you who wonder why this is relevant, here is javap listing for interface ExecutionContext:
public interface scala.concurrent.ExecutionContext{
public abstract void execute(java.lang.Runnable);
public abstract void reportFailure(java.lang.Throwable);
public abstract scala.concurrent.ExecutionContext prepare();
}
No “name” field anywhere. I guess it comes from this part of the source:
def reportFailure(@deprecatedName('t) cause: Throwable): Unit
I assume that I shall file a ticket?
Regards,
Dr. Roland KuhnAkka Tech LeadTypesafe – Empowering professional developers to build amazing apps.
twitter:
@rolandkuhn
See you at Scala Days 2013 in NYC!
June 10th - June 12th
www.scaladays.org