summaryrefslogtreecommitdiff
path: root/test/files/pos/t6722.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/pos/t6722.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/pos/t6722.scala')
-rw-r--r--test/files/pos/t6722.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/pos/t6722.scala b/test/files/pos/t6722.scala
new file mode 100644
index 0000000000..576746c915
--- /dev/null
+++ b/test/files/pos/t6722.scala
@@ -0,0 +1,11 @@
+import scala.language.dynamics
+
+class Dyn extends Dynamic {
+ def selectDynamic(s: String): Dyn = new Dyn
+ def get[T]: T = null.asInstanceOf[T]
+}
+
+object Foo {
+ val dyn = new Dyn
+ dyn.foo.bar.baz.get[String]
+}