diff options
author | Dmitry Petrashko <dark@d-d.me> | 2016-06-22 15:38:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-22 15:38:15 +0200 |
commit | 93599be7f5489c8913a8e961f1b291b4b132dca7 (patch) | |
tree | d081b213e58030741fd9c2f7ba80b5576f219be4 /tests/neg/static-implements.scala | |
parent | 914d465aa13cf90fab71dbdf5ab314f9be191891 (diff) | |
parent | 3c93c5c48f5222c6ad40267d29d32cf7c597df41 (diff) | |
download | dotty-93599be7f5489c8913a8e961f1b291b4b132dca7.tar.gz dotty-93599be7f5489c8913a8e961f1b291b4b132dca7.tar.bz2 dotty-93599be7f5489c8913a8e961f1b291b4b132dca7.zip |
Merge pull request #1226 from dotty-staging/static-fixes
Multiple fixes to @static
Diffstat (limited to 'tests/neg/static-implements.scala')
-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) + } +} |