diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2010-05-07 07:51:27 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2010-05-07 07:51:27 +0000 |
commit | aa09cc3505096294b40949246d1906c760b914dc (patch) | |
tree | 7c5b52a35f8cb4ad543d9cfd056fccb491b0b559 /test/files | |
parent | c55b106f503d5e712e69823cfeb1cab2460221eb (diff) | |
download | scala-aa09cc3505096294b40949246d1906c760b914dc.tar.gz scala-aa09cc3505096294b40949246d1906c760b914dc.tar.bz2 scala-aa09cc3505096294b40949246d1906c760b914dc.zip |
close #3400. no review
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/jvm/annotations.check | 2 | ||||
-rw-r--r-- | test/files/jvm/annotations.scala | 19 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test/files/jvm/annotations.check b/test/files/jvm/annotations.check index fe14289381..e307f8930d 100644 --- a/test/files/jvm/annotations.check +++ b/test/files/jvm/annotations.check @@ -48,3 +48,5 @@ public void Test4$Foo12.name_$eq(java.lang.String) 0 99 +dylan +2 diff --git a/test/files/jvm/annotations.scala b/test/files/jvm/annotations.scala index 136aae6675..f32eb625e9 100644 --- a/test/files/jvm/annotations.scala +++ b/test/files/jvm/annotations.scala @@ -181,6 +181,24 @@ object Test5 { } } +object Test6 { + import scala.reflect.BeanProperty + import scala.reflect.BooleanBeanProperty + class C(@BeanProperty var text: String) + class D(@BooleanBeanProperty var prop: Boolean) { + @BeanProperty val m: Int = if (prop) 1 else 2 + } + + def run { + val c = new C("bob") + c.setText("dylan") + println(c.getText()) + if (new D(true).isProp()) { + println(new D(false).getM()) + } + } +} + // #3345 class A3345(@volatile private var i:Int) @@ -191,5 +209,6 @@ object Test { Test3.run // requires the use of -target:jvm-1.5 Test4.run Test5.run + Test6.run } } |