diff options
-rw-r--r-- | test/pending/run/t5726a.scala | 17 | ||||
-rw-r--r-- | test/pending/run/t5726b.scala | 16 |
2 files changed, 33 insertions, 0 deletions
diff --git a/test/pending/run/t5726a.scala b/test/pending/run/t5726a.scala new file mode 100644 index 0000000000..24d828a159 --- /dev/null +++ b/test/pending/run/t5726a.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() +}
\ No newline at end of file diff --git a/test/pending/run/t5726b.scala b/test/pending/run/t5726b.scala new file mode 100644 index 0000000000..839dcf40b5 --- /dev/null +++ b/test/pending/run/t5726b.scala @@ -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() +}
\ No newline at end of file |