From aa09cc3505096294b40949246d1906c760b914dc Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Fri, 7 May 2010 07:51:27 +0000 Subject: close #3400. no review --- test/files/jvm/annotations.check | 2 ++ test/files/jvm/annotations.scala | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) (limited to 'test/files/jvm') 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 } } -- cgit v1.2.3