Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class MacroAnnotations:
// Replace this case with the nested cases.
case ex0: InvocationTargetException =>
ex0.getCause match
case ex: CompilationUnit.SuspendException =>
throw ex
case ex: scala.quoted.runtime.StopMacroExpansion =>
if !ctx.reporter.hasErrors then
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)
Expand Down
2 changes: 1 addition & 1 deletion tests/neg-macros/annot-crash.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- Error: tests/neg-macros/annot-crash/Test_2.scala:1:0 ----------------------------------------------------------------
1 |@crash // error
|^^^^^^
|Failed to evaluate macro.
|Failed to evaluate macro annotation '@crash'.
| Caused by class scala.NotImplementedError: an implementation is missing
| scala.Predef$.$qmark$qmark$qmark(Predef.scala:344)
| crash.transform(Macro_1.scala:7)