From 9d9ae0a6126933200bef7c2ce4da7d1f86e46607 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Mon, 7 May 2012 23:56:06 +0200 Subject: tests for SI-5726 --- test/pending/run/t5726a.scala | 17 +++++++++++++++++ test/pending/run/t5726b.scala | 16 ++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 test/pending/run/t5726a.scala create mode 100644 test/pending/run/t5726b.scala (limited to 'test/pending/run') 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 -- cgit v1.2.3