diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-09-18 22:36:50 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-09-18 22:36:50 +1000 |
commit | 79f59c5330122ee1ff1bac833bc77feca81d49af (patch) | |
tree | ec055a669fac827f3b6a2732d0a1b1b35a8149bc /test/files | |
parent | 8e1efc3549c081b0305df26e6963b49174b1f402 (diff) | |
parent | 7c81959d724a6565c00b86591d54c195d8bed1de (diff) | |
download | scala-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/files')
-rw-r--r-- | test/files/presentation/t8459.check | 14 | ||||
-rw-r--r-- | test/files/presentation/t8459/Test.scala | 3 | ||||
-rw-r--r-- | test/files/presentation/t8459/src/IncompleteDynamicSelect.scala | 14 |
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 +} + |