Permalink
Browse files

tests for SI-5726

  • Loading branch information...
xeno-by committed May 7, 2012
1 parent 7cac633 commit 9d9ae0a6126933200bef7c2ce4da7d1f86e46607
Showing with 33 additions and 0 deletions.
  1. +17 −0 test/pending/run/t5726a.scala
  2. +16 −0 test/pending/run/t5726b.scala
@@ -0,0 +1,17 @@
import language.dynamics
class DynamicTest extends Dynamic {
def selectDynamic(name: String) = s"value of $name"
def updateDynamic(name: String)(value: Any) {
println(s"You have just updated property '$name' with value: $value")
}
}
object MyApp extends App {
def testing() {
val test = new DynamicTest
test.firstName = "John"
}
testing()
}
@@ -0,0 +1,16 @@
import language.dynamics
class DynamicTest extends Dynamic {
def updateDynamic(name: String)(value: Any) {
println(s"You have just updated property '$name' with value: $value")
}
}
object MyApp extends App {
def testing() {
val test = new DynamicTest
test.firstName = "John"
}
testing()
}

0 comments on commit 9d9ae0a

Please sign in to comment.