diff options
author | Mirco Dotta <mirco.dotta@typesafe.com> | 2013-12-03 11:45:35 +0100 |
---|---|---|
committer | Mirco Dotta <mirco.dotta@typesafe.com> | 2013-12-12 17:20:35 +0100 |
commit | 7f4720c5dbd0711983e1abb8be3781e7d53b049b (patch) | |
tree | d97ebd3a42d7ce4e17db0e80768babc7e452c09f | |
parent | ccacb06c4928fd6aebc2c2539d7565cb079dc625 (diff) | |
download | scala-7f4720c5dbd0711983e1abb8be3781e7d53b049b.tar.gz scala-7f4720c5dbd0711983e1abb8be3781e7d53b049b.tar.bz2 scala-7f4720c5dbd0711983e1abb8be3781e7d53b049b.zip |
SI-4287 Added test demonstrating hyperlinking to constructor's argument
This test was inspired by `test/files/run/t5603`, whose output (.check file)
will need to be updated in the upcoming commit that fixes SI-4287, because
the positions associated to the tree have slightly changed.
The additional test should demonstrate that the change in positions isn't
relevant, and it doesn't affect functionality. In fact, hyperlinking to a
constructor's argument work as expected before and after fixing SI-4287.
-rw-r--r-- | test/files/presentation/t4287b.check | 6 | ||||
-rw-r--r-- | test/files/presentation/t4287b/Test.scala | 3 | ||||
-rw-r--r-- | test/files/presentation/t4287b/src/Foo.scala | 15 |
3 files changed, 24 insertions, 0 deletions
diff --git a/test/files/presentation/t4287b.check b/test/files/presentation/t4287b.check new file mode 100644 index 0000000000..d4b33650fd --- /dev/null +++ b/test/files/presentation/t4287b.check @@ -0,0 +1,6 @@ +reload: Foo.scala + +askHyperlinkPos for `i` at (14,11) Foo.scala +================================================================================ +[response] found askHyperlinkPos for `i` at (10,9) Foo.scala +================================================================================ diff --git a/test/files/presentation/t4287b/Test.scala b/test/files/presentation/t4287b/Test.scala new file mode 100644 index 0000000000..bec1131c4c --- /dev/null +++ b/test/files/presentation/t4287b/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/t4287b/src/Foo.scala b/test/files/presentation/t4287b/src/Foo.scala new file mode 100644 index 0000000000..47c676e2a2 --- /dev/null +++ b/test/files/presentation/t4287b/src/Foo.scala @@ -0,0 +1,15 @@ +trait Greeting { + val name: String + val msg = "How are you, "+name +} + +object Greeting { + val hello = "hello" +} + +class C(i: Int) extends { + val nameElse = "Bob" +} with Greeting { + val name = "avc" + println(i/*#*/) +}
\ No newline at end of file |