diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-12-02 03:57:44 -0800 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-12-02 03:57:44 -0800 |
commit | 7c1d1149291e1b83c96a0f6954144b9e97c030ea (patch) | |
tree | 83871119f84c7b8eeab0788d0fb928959c103e01 /test/files/presentation/t7548b/Test.scala | |
parent | da7395016ca8410fbabf5418288f7275ccaf17a8 (diff) | |
parent | 02308c96910a76a09c2654db304a0696c0b603af (diff) | |
download | scala-7c1d1149291e1b83c96a0f6954144b9e97c030ea.tar.gz scala-7c1d1149291e1b83c96a0f6954144b9e97c030ea.tar.bz2 scala-7c1d1149291e1b83c96a0f6954144b9e97c030ea.zip |
Merge pull request #3208 from dotta/si-7548-on-2.10
askTypeAt returns the same type for full/ targeted typecheck (2.10.x)
Diffstat (limited to 'test/files/presentation/t7548b/Test.scala')
-rw-r--r-- | test/files/presentation/t7548b/Test.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/presentation/t7548b/Test.scala b/test/files/presentation/t7548b/Test.scala new file mode 100644 index 0000000000..0c022df839 --- /dev/null +++ b/test/files/presentation/t7548b/Test.scala @@ -0,0 +1,17 @@ +import scala.tools.nsc.interactive.tests.InteractiveTest + +object Test extends InteractiveTest { + override protected def loadSources() { /* don't parse or typecheck sources */ } + + import compiler._ + + override def runDefaultTests() { + val res = new Response[Tree] + val pos = compiler.rangePos(sourceFiles.head, 191, 191, 191) // + + compiler.askTypeAt(pos, res) + res.get match { + case Left(tree) => compiler.ask(() => reporter.println(s"$tree: ${tree.tpe}")) + case Right(ex) => reporter.println(ex) + } + } +} |