summaryrefslogtreecommitdiff
path: root/test/files/run/t6320.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t6320.scala')
-rw-r--r--test/files/run/t6320.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/run/t6320.scala b/test/files/run/t6320.scala
new file mode 100644
index 0000000000..26085a3d7d
--- /dev/null
+++ b/test/files/run/t6320.scala
@@ -0,0 +1,9 @@
+import scala.tools.partest.ReplTest
+
+object Test extends ReplTest {
+ def code = """
+import scala.language.dynamics
+class Dyn(m: Map[String, Any]) extends Dynamic { def selectDynamic[T](s: String): T = m(s).asInstanceOf[T] }
+new Dyn(Map("foo" -> 10)).foo[Int]
+ """
+}