Skip to content

Commit 1babee2

Browse files
oderskyliufengyun
authored andcommitted
Don't suspend if errors were reported.
1 parent 6d5ef8a commit 1babee2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
12391239
val ctx1 = tastyreflect.MacroExpansion.context(inlinedFrom)
12401240
val dependencies = macroDependencies(body)
12411241

1242-
if dependencies.nonEmpty then
1242+
if dependencies.nonEmpty && !ctx.reporter.errorsReported then
12431243
for sym <- dependencies do
12441244
if ctx.compilationUnit.source.file == sym.associatedFile then
12451245
ctx.error(em"Cannot call macro $sym defined in the same source file", call.sourcePos)

0 commit comments

Comments
 (0)