diff options
Diffstat (limited to 'test/files/presentation/t8459')
-rw-r--r-- | test/files/presentation/t8459/Test.scala | 3 | ||||
-rw-r--r-- | test/files/presentation/t8459/src/IncompleteDynamicSelect.scala | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/files/presentation/t8459/Test.scala b/test/files/presentation/t8459/Test.scala new file mode 100644 index 0000000000..bec1131c4c --- /dev/null +++ b/test/files/presentation/t8459/Test.scala @@ -0,0 +1,3 @@ +import scala.tools.nsc.interactive.tests.InteractiveTest + +object Test extends InteractiveTest
\ No newline at end of file diff --git a/test/files/presentation/t8459/src/IncompleteDynamicSelect.scala b/test/files/presentation/t8459/src/IncompleteDynamicSelect.scala new file mode 100644 index 0000000000..61976fe2f9 --- /dev/null +++ b/test/files/presentation/t8459/src/IncompleteDynamicSelect.scala @@ -0,0 +1,14 @@ +import scala.language.dynamics + +class F extends Dynamic { + def applyDynamic(name: String)(args: Any*) = + s"method '$name' called with arguments ${args.mkString("'", "', '", "'")}" +} + +class Foo { + val bar = new F + + bar. //note whitespace after dot + /*?*/ //force typechecking +} + |