diff --git a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala index 73cb662edcec..e6be248a41fa 100644 --- a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala +++ b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala @@ -658,6 +658,7 @@ trait ParallelTesting extends RunnerOrchestration { self => if (errors > 0) errorMap.put(s"${file.getPath}:${lineNbr}", errors) + val noposErrors = line.sliding("// nopos-error".length).count(_.mkString == "// nopos-error") if (noposErrors > 0) { val nopos = errorMap.get("nopos") @@ -665,6 +666,12 @@ trait ParallelTesting extends RunnerOrchestration { self => errorMap.put("nopos", noposErrors + existing) } + val possibleTypos = List("//error" -> "// error" , "//nopos-error" -> "// nopos-error") + for ((possibleTypo, expected) <- possibleTypos) { + if (line.contains(possibleTypo)) + echo(s"Warning: Possible typo in error tag in file ${file.getCanonicalPath}:$lineNbr: found `$possibleTypo` but expected `$expected`") + } + expectedErrors += noposErrors + errors } }