summaryrefslogtreecommitdiff
path: root/test/files/pos/t8498.scala
diff options
context:
space:
mode:
authorAntoine Gourlay <antoine@gourlay.fr>2014-08-19 15:54:01 +0200
committerAntoine Gourlay <antoine@gourlay.fr>2014-08-21 10:00:05 +0200
commit984025b2bd15b343181aea9c00a50ac1cd721ca1 (patch)
tree0b102d8048ffe82b837819ca03e4b47204746da9 /test/files/pos/t8498.scala
parent5e0880fe05fb65a8757721be7e5be6a3259c19a8 (diff)
downloadscala-984025b2bd15b343181aea9c00a50ac1cd721ca1.tar.gz
scala-984025b2bd15b343181aea9c00a50ac1cd721ca1.tar.bz2
scala-984025b2bd15b343181aea9c00a50ac1cd721ca1.zip
SI-8498 @compileTimeOnly should be aware of bridge methods.
Calling a @compileTimeOnly method from another @compileTimeOnly method happens when the former gets a bridge method. It should not throw an error. Calling the bridge or the method will anyway.
Diffstat (limited to 'test/files/pos/t8498.scala')
-rw-r--r--test/files/pos/t8498.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/files/pos/t8498.scala b/test/files/pos/t8498.scala
new file mode 100644
index 0000000000..6808c89051
--- /dev/null
+++ b/test/files/pos/t8498.scala
@@ -0,0 +1,6 @@
+import scala.annotation.compileTimeOnly
+
+class C(val s: String) extends AnyVal {
+ @compileTimeOnly("error")
+ def error = ???
+}