diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2016-04-18 21:49:49 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2016-06-07 14:18:27 +0200 |
commit | 1932b171d1043c9702f5b393a9a3f36b584fe41a (patch) | |
tree | 38d85461b5219c929959aa3996cae1f5624754c7 /tests/neg | |
parent | 7cacd0f0625654b408c11fe37553342f027c8043 (diff) | |
download | dotty-1932b171d1043c9702f5b393a9a3f36b584fe41a.tar.gz dotty-1932b171d1043c9702f5b393a9a3f36b584fe41a.tar.bz2 dotty-1932b171d1043c9702f5b393a9a3f36b584fe41a.zip |
Test #1224.
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) + } +} |