Skip to content

Commit 0fe0490

Browse files
committed
Use ??? instead of EmptyTree for StopMacroExpansion.
1 parent 44aa3c6 commit 0fe0490

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: compiler/src/dotty/tools/dotc/inlines/Inlines.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ object Inlines:
496496
// different for bindings from arguments and bindings from body.
497497
val inlined = tpd.Inlined(call, bindings, expansion)
498498

499-
if !hasOpaqueProxies || !inlined.tpe.exists then inlined
499+
if !hasOpaqueProxies then inlined
500500
else
501501
val target =
502502
if inlinedMethod.is(Transparent) then call.tpe & inlined.tpe

Diff for: compiler/src/dotty/tools/dotc/transform/Splicer.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ object Splicer {
7272
if !ctx.reporter.hasErrors then
7373
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.", splicePos)
7474
// errors have been emitted
75-
EmptyTree
75+
ref(defn.Predef_undefined).withType(ErrorType(em"macro expansion was stopped"))
7676
case ex: StopInterpretation =>
7777
report.error(ex.msg, ex.pos)
7878
ref(defn.Predef_undefined).withType(ErrorType(ex.msg))

Diff for: tests/neg-macros/i9014b.check

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
|
88
| given_Bar
99
|
10-
| But given instance given_Bar does not match type Bar.
10+
| But macro expansion was stopped.

0 commit comments

Comments
 (0)