diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-05-07 23:56:06 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-05-07 23:56:06 +0200 |
commit | 9d9ae0a6126933200bef7c2ce4da7d1f86e46607 (patch) | |
tree | 49dd110ac14a5ce4ee6396aecc4317851ec268a9 /test/pending | |
parent | 7cac6334d4437ff54c4979799574045501f64135 (diff) | |
download | scala-9d9ae0a6126933200bef7c2ce4da7d1f86e46607.tar.gz scala-9d9ae0a6126933200bef7c2ce4da7d1f86e46607.tar.bz2 scala-9d9ae0a6126933200bef7c2ce4da7d1f86e46607.zip |
tests for SI-5726
Diffstat (limited to 'test/pending')
-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 |