diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t10068.check | 13 | ||||
-rw-r--r-- | test/files/neg/t10068.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t10068.scala | 9 |
3 files changed, 23 insertions, 0 deletions
diff --git a/test/files/neg/t10068.check b/test/files/neg/t10068.check new file mode 100644 index 0000000000..2bb27c4fd8 --- /dev/null +++ b/test/files/neg/t10068.check @@ -0,0 +1,13 @@ +t10068.scala:5: error: i : Only methods can be marked @elidable. + @elidable(INFO) val i: Int = 42 + ^ +t10068.scala:6: error: j: Only methods can be marked @elidable. + @elidable(INFO) lazy val j: Int = 42 + ^ +t10068.scala:7: error: k : Only methods can be marked @elidable. + @elidable(INFO) var k: Int = 42 + ^ +t10068.scala:9: error: D: Only methods can be marked @elidable. +@elidable(INFO) class D + ^ +four errors found diff --git a/test/files/neg/t10068.flags b/test/files/neg/t10068.flags new file mode 100644 index 0000000000..2b18795468 --- /dev/null +++ b/test/files/neg/t10068.flags @@ -0,0 +1 @@ +-Xelide-below WARNING -Xsource:2.13 diff --git a/test/files/neg/t10068.scala b/test/files/neg/t10068.scala new file mode 100644 index 0000000000..a45ee5dac4 --- /dev/null +++ b/test/files/neg/t10068.scala @@ -0,0 +1,9 @@ + +import annotation._, elidable._ + +class C { + @elidable(INFO) val i: Int = 42 + @elidable(INFO) lazy val j: Int = 42 + @elidable(INFO) var k: Int = 42 +} +@elidable(INFO) class D |