summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAntonio Cunei <antonio.cunei@epfl.ch>2010-05-07 09:21:55 +0000
committerAntonio Cunei <antonio.cunei@epfl.ch>2010-05-07 09:21:55 +0000
commiteac24aa1b8e03231cc72096309dc71941002c554 (patch)
tree4b4565d3f42f134585db866ea5241be18d2bedaa /test
parente8ad9d9f30e20dc10f5fe012ed8833c9df3e1912 (diff)
downloadscala-eac24aa1b8e03231cc72096309dc71941002c554.tar.gz
scala-eac24aa1b8e03231cc72096309dc71941002c554.tar.bz2
scala-eac24aa1b8e03231cc72096309dc71941002c554.zip
Merged revisions 21840 via svnmerge from
https://lampsvn.epfl.ch/svn-repos/scala/scala/trunk ........ r21840 | rytz | 2010-05-07 09:51:27 +0200 (Fri, 07 May 2010) | 1 line close #3400. no review ........
Diffstat (limited to 'test')
-rw-r--r--test/files/jvm/annotations.check2
-rw-r--r--test/files/jvm/annotations.scala19
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
}
}