1 2 3 4 5 6 7 8 9 10 11
import annotation.static abstract class A { def x: Int } class T object T extends A { @static override val x = 10 // error: static methods cannot implement stuff def main(args: Array[String]): Unit = { println((this: A).x) } }