From d00572d159a3a15664afbf09d1ff914df4d2c512 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 25 Jun 2015 12:01:32 +0200 Subject: Avoid crasher when first token of a program is in error This used to give a crash in SourcePositiom, promoted by feeding its calculations with a negative offset. --- test/dotc/tests.scala | 1 + 1 file changed, 1 insertion(+) (limited to 'test') diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala index 1aa35e3ee..520abc222 100644 --- a/test/dotc/tests.scala +++ b/test/dotc/tests.scala @@ -140,6 +140,7 @@ class tests extends CompilerTest { @Test def neg_shadowedImplicits = compileFile(negDir, "arrayclone-new", xerrors = 2) @Test def neg_traitParamsTyper = compileFile(negDir, "traitParamsTyper", xerrors = 5) @Test def neg_traitParamsMixin = compileFile(negDir, "traitParamsMixin", xerrors = 2) + @Test def neg_firstError = compileFile(negDir, "firstError", xerrors = 3) @Test def run_all = runFiles(runDir) -- cgit v1.2.3