File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ object Splicer {
6262 catch {
6363 case ex : CompilationUnit .SuspendException =>
6464 throw ex
65- case ex : scala.quoted.report. StopQuotedContext if ctx.reporter.hasErrors =>
65+ case ex : scala.quoted.internal. StopMacroExpansion if ctx.reporter.hasErrors =>
6666 // errors have been emitted
6767 EmptyTree
6868 case ex : StopInterpretation =>
@@ -419,7 +419,7 @@ object Splicer {
419419 throw new StopInterpretation (sw.toString, pos)
420420 case ex : InvocationTargetException =>
421421 ex.getTargetException match {
422- case ex : scala.quoted.report. StopQuotedContext =>
422+ case ex : scala.quoted.internal. StopMacroExpansion =>
423423 throw ex
424424 case MissingClassDefinedInCurrentRun (sym) if ctx.compilationUnit.isSuspendable =>
425425 if (ctx.settings.XprintSuspension .value)
Original file line number Diff line number Diff line change 1+ package scala .quoted .internal
2+
3+ /** Throwable used to stop the expansion of a macro after an error was reported */
4+ class StopMacroExpansion extends Throwable
Original file line number Diff line number Diff line change @@ -12,15 +12,15 @@ object report:
1212 import qctx .reflect ._
1313 Reporting .error(msg, Term .of(expr).pos)
1414
15- /** Report an error at the position of the macro expansion and throws a StopQuotedContext */
15+ /** Report an error at the position of the macro expansion and throws a StopMacroExpansion */
1616 def throwError (msg : => String )(using qctx : QuoteContext ): Nothing = {
1717 error(msg)
18- throw new StopQuotedContext
18+ throw new internal. StopMacroExpansion
1919 }
20- /** Report an error at the on the position of `expr` and throws a StopQuotedContext */
20+ /** Report an error at the on the position of `expr` and throws a StopMacroExpansion */
2121 def throwError (msg : => String , expr : Expr [Any ])(using qctx : QuoteContext ): Nothing = {
2222 error(msg, expr)
23- throw new StopQuotedContext
23+ throw new internal. StopMacroExpansion
2424 }
2525
2626 /** Report a warning */
@@ -33,7 +33,4 @@ object report:
3333 import qctx .reflect ._
3434 Reporting .warning(msg, Term .of(expr).pos)
3535
36- /** Throwable used to stop the expansion of a macro after an error was reported */
37- class StopQuotedContext extends Throwable
38-
3936end report
You can’t perform that action at this time.
0 commit comments