diff options
Diffstat (limited to 'tests/pos/t6722.scala')
-rw-r--r-- | tests/pos/t6722.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/pos/t6722.scala b/tests/pos/t6722.scala new file mode 100644 index 000000000..576746c91 --- /dev/null +++ b/tests/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] +} |