summaryrefslogtreecommitdiff
path: root/test/files/run/t6320.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-11-28 18:36:47 +0100
committerPaul Phillips <paulp@improving.org>2012-11-29 09:39:21 +0100
commita6941944bf80f660722e9151801776715c3e4ab5 (patch)
treeef0bec6d22cc02af500cc1b88bfd5fd8ded86d22 /test/files/run/t6320.scala
parentdac1488a889ff5952ff85e87ec4acd7d72a74891 (diff)
downloadscala-a6941944bf80f660722e9151801776715c3e4ab5.tar.gz
scala-a6941944bf80f660722e9151801776715c3e4ab5.tar.bz2
scala-a6941944bf80f660722e9151801776715c3e4ab5.zip
Test cases for SI-5726, SI-5733, SI-6320, SI-6551, SI-6722.
All tickets involving selectDynamic fixed by the prior commit. It also fixes SI-6663, but that already has a test case.
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]
+ """
+}