@@ -293,7 +293,7 @@ object Inliner {
293
293
private enum ErrorKind :
294
294
case Parser , Typer
295
295
296
- private def compileForErrors (tree : Tree , stopAfterParser : Boolean )(using Context ): List [(ErrorKind , Error )] =
296
+ private def compileForErrors (tree : Tree )(using Context ): List [(ErrorKind , Error )] =
297
297
assert(tree.symbol == defn.CompiletimeTesting_typeChecks || tree.symbol == defn.CompiletimeTesting_typeCheckErrors )
298
298
def stripTyped (t : Tree ): Tree = t match {
299
299
case Typed (t2, _) => stripTyped(t2)
@@ -317,7 +317,7 @@ object Inliner {
317
317
318
318
val parseErrors = ctx2.reporter.allErrors.toList
319
319
res ++= parseErrors.map(e => ErrorKind .Parser -> e)
320
- if ! stopAfterParser || res.isEmpty then
320
+ if res.isEmpty then
321
321
ctx2.typer.typed(tree2)(using ctx2)
322
322
val typerErrors = ctx2.reporter.allErrors.filterNot(parseErrors.contains)
323
323
res ++= typerErrors.map(e => ErrorKind .Typer -> e)
@@ -346,12 +346,12 @@ object Inliner {
346
346
347
347
/** Expand call to scala.compiletime.testing.typeChecks */
348
348
def typeChecks (tree : Tree )(using Context ): Tree =
349
- val errors = compileForErrors(tree, true )
349
+ val errors = compileForErrors(tree)
350
350
Literal (Constant (errors.isEmpty)).withSpan(tree.span)
351
351
352
352
/** Expand call to scala.compiletime.testing.typeCheckErrors */
353
353
def typeCheckErrors (tree : Tree )(using Context ): Tree =
354
- val errors = compileForErrors(tree, false )
354
+ val errors = compileForErrors(tree)
355
355
packErrors(errors)
356
356
357
357
/** Expand call to scala.compiletime.codeOf */
0 commit comments