Skip to content

Commit 231d13c

Browse files
hamzaremmaltgodzik
authored andcommitted
Allow macro annotations to recover from suspension
1 parent 4569bb4 commit 231d13c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/src/dotty/tools/dotc/transform/MacroAnnotations.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ class MacroAnnotations:
6060
// Replace this case with the nested cases.
6161
case ex0: InvocationTargetException =>
6262
ex0.getCause match
63+
case ex: CompilationUnit.SuspendException =>
64+
throw ex
6365
case ex: scala.quoted.runtime.StopMacroExpansion =>
6466
if !ctx.reporter.hasErrors then
6567
report.error("Macro expansion was aborted by the macro without any errors reported. Macros should issue errors to end-users when aborting a macro expansion with StopMacroExpansion.", annot.tree)

0 commit comments

Comments
 (0)