From a6941944bf80f660722e9151801776715c3e4ab5 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 28 Nov 2012 18:36:47 +0100 Subject: 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. --- test/files/run/t6320.scala | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/files/run/t6320.scala (limited to 'test/files/run/t6320.scala') 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] + """ +} -- cgit v1.2.3