diff options
Diffstat (limited to 'tests/neg')
-rw-r--r-- | tests/neg/static-implements.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/neg/static-implements.scala b/tests/neg/static-implements.scala new file mode 100644 index 000000000..8e8a8800c --- /dev/null +++ b/tests/neg/static-implements.scala @@ -0,0 +1,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) + } +} |