summaryrefslogtreecommitdiff
path: root/test/files/run/dynamic-updateDynamic.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/dynamic-updateDynamic.scala')
-rw-r--r--test/files/run/dynamic-updateDynamic.scala28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/files/run/dynamic-updateDynamic.scala b/test/files/run/dynamic-updateDynamic.scala
new file mode 100644
index 0000000000..80fe0ea35f
--- /dev/null
+++ b/test/files/run/dynamic-updateDynamic.scala
@@ -0,0 +1,28 @@
+import scala.tools.partest.DirectTest
+
+object Test extends DirectTest {
+
+ override def extraSettings: String =
+ s"-usejavacp -Xprint-pos -Xprint:typer -Yrangepos -Ystop-after:typer -d ${testOutput.path}"
+
+ override def code = """
+ object X {
+ val d = new D
+ d.field = 10
+ d.field
+ }
+ """.trim
+
+ override def show(): Unit = {
+ Console.withErr(System.out) {
+ compile()
+ }
+ }
+}
+
+import language.dynamics
+class D extends Dynamic {
+ def selectDynamic(name: String): Any = ???
+ def updateDynamic(name: String)(value: Any): Unit = ???
+}
+