From f69b8468b76edc9f25a4cb97022a136be988b236 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Tue, 11 Dec 2012 18:59:27 +0100 Subject: SI-6288 Fix positioning of label jumps ICode generation was assigning the position of the last label jump to all jumps to that particular label def. This problem is particularly annoying under the new pattern matcher: a breakpoint in the body of the final case will be triggered on the way out of the body of any other case. Thanks to @dragos for the expert guidance as we wended our way through GenICode to the troublesome code. Chalk up another bug for mutability. I believe that the ICode output should be stable enough to use a a .check file, if it proves otherwise we should make it so. --- src/partest/scala/tools/partest/DirectTest.scala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/partest') diff --git a/src/partest/scala/tools/partest/DirectTest.scala b/src/partest/scala/tools/partest/DirectTest.scala index 8c18809ad6..483cb491a1 100644 --- a/src/partest/scala/tools/partest/DirectTest.scala +++ b/src/partest/scala/tools/partest/DirectTest.scala @@ -39,6 +39,10 @@ abstract class DirectTest extends App { // new compiler def newCompiler(args: String*): Global = { val settings = newSettings((CommandLineParser tokenize ("-d \"" + testOutput.path + "\" " + extraSettings)) ++ args.toList) + newCompiler(settings) + } + + def newCompiler(settings: Settings): Global = { if (settings.Yrangepos.value) new Global(settings, reporter(settings)) with interactive.RangePositions else new Global(settings, reporter(settings)) } -- cgit v1.2.3