summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-09-18 22:36:50 +1000
committerJason Zaugg <jzaugg@gmail.com>2014-09-18 22:36:50 +1000
commit79f59c5330122ee1ff1bac833bc77feca81d49af (patch)
treeec055a669fac827f3b6a2732d0a1b1b35a8149bc /test
parent8e1efc3549c081b0305df26e6963b49174b1f402 (diff)
parent7c81959d724a6565c00b86591d54c195d8bed1de (diff)
downloadscala-79f59c5330122ee1ff1bac833bc77feca81d49af.tar.gz
scala-79f59c5330122ee1ff1bac833bc77feca81d49af.tar.bz2
scala-79f59c5330122ee1ff1bac833bc77feca81d49af.zip
Merge pull request #3988 from ghik/issue/8459
SI-8459 fix incorrect positions for incomplete selection trees
Diffstat (limited to 'test')
-rw-r--r--test/files/presentation/t8459.check14
-rw-r--r--test/files/presentation/t8459/Test.scala3
-rw-r--r--test/files/presentation/t8459/src/IncompleteDynamicSelect.scala14
3 files changed, 31 insertions, 0 deletions
diff --git a/test/files/presentation/t8459.check b/test/files/presentation/t8459.check
new file mode 100644
index 0000000000..336c147141
--- /dev/null
+++ b/test/files/presentation/t8459.check
@@ -0,0 +1,14 @@
+reload: IncompleteDynamicSelect.scala
+
+askType at IncompleteDynamicSelect.scala(12,2)
+================================================================================
+[response] askTypeAt (12,2)
+scala.AnyRef {
+ def <init>(): Foo = {
+ Foo.super.<init>();
+ ()
+ };
+ private[this] val bar: F = new F();
+ Foo.this.bar.<selectDynamic: error>("<error>")
+}
+================================================================================
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
+}
+