diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-10-01 19:06:52 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-10-01 19:06:52 +1000 |
commit | e5534f0a3f9543426f129c18e1b3139519108e2f (patch) | |
tree | d30900fee05d994e331846fb20282681f7d78533 /test/files/run | |
parent | ce7f9f00c2d649f3f9ff3ad11fb2ac91b9094ed3 (diff) | |
parent | 6346c6b46d2991def37a9ae81ed5f4f8b90d5efd (diff) | |
download | scala-e5534f0a3f9543426f129c18e1b3139519108e2f.tar.gz scala-e5534f0a3f9543426f129c18e1b3139519108e2f.tar.bz2 scala-e5534f0a3f9543426f129c18e1b3139519108e2f.zip |
Merge pull request #4010 from lrytz/t8087
SI-8087 keep annotations on mixed-in private[this] fields
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t8087.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/t8087.scala b/test/files/run/t8087.scala new file mode 100644 index 0000000000..6047211756 --- /dev/null +++ b/test/files/run/t8087.scala @@ -0,0 +1,12 @@ +trait Foo { + @volatile private[this] var x: String = "" + @volatile private var y: String = "" +} + +class Bar extends Foo + +object Test extends App { + classOf[Bar].getDeclaredFields.foreach(f => { + assert(java.lang.reflect.Modifier.isVolatile(f.getModifiers), f.getName) + }) +} |