You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug in the macro implementation was fixed upstream. The fact that compiler was crashing isn't a bug per-se, given -Xcheck-macros (same if it were -Ycheck) errors out.
Currently, however this smaller minimisation of the macro implementation doesn't even compile, because "prepare inlineable" widens a prefix (type avoidance) which fails -Ycheck:
Fatal compiler crash when compiling: tests/pos-macros/i7128:
assertion failed: Found: quoted.Quotes#reflect.Term2s
Required: Macro.this.qctx.reflect.Term
found: type Term in trait reflectModule with type Term, flags = <deferred> <touched>, underlying = quoted.Quotes#reflect.Term, <: quoted.Quotes#reflect.Statement, quoted.Quotes#reflect.Statement, <: quoted.Quotes#reflect.Tree, quoted.Quotes#reflect.Tree, <: AnyRef, AnyRef, = Object, Object, Any with Matchable {...}
expected: type Term in trait reflectModule with type Term, flags = <deferred> <touched>, underlying = Macro.this.qctx.reflect.Term, <: Macro.this.qctx.reflect.Statement, Macro.this.qctx.reflect.Statement, <: Macro.this.qctx.reflect.Tree, Macro.this.qctx.reflect.Tree, <: AnyRef, AnyRef, = Object, Object, Any with Matchable {...}
tree = this.inline$qctx.reflect.asTerm('{rt}.apply(evidence$2))
at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
at dotty.tools.dotc.transform.TreeChecker$Checker.adapt(TreeChecker.scala:598)
at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:463)
at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:866)
Contents of splices do not need to be transformed as they will be
evaluated before the code is inlined. Therefore we only want to make
code at staging level 1 or grater inlineable. If the quote is in an
inline method, we also need to make the contents of the splices
inlineable (i.e. for any level).
Fixscala#14603
Contents of splices do not need to be transformed as they will be
evaluated before the code is inlined. Therefore we only want to make
code at staging level 1 or grater inlineable. If the quote is in an
inline method, we also need to make the contents of the splices
inlineable (i.e. for any level).
Fixscala#14603
The bug in the macro implementation was fixed upstream. The fact that compiler was crashing isn't a bug per-se, given -Xcheck-macros (same if it were -Ycheck) errors out.
Currently, however this smaller minimisation of the macro implementation doesn't even compile, because "prepare inlineable" widens a prefix (type avoidance) which fails -Ycheck:
Nico to close and spin off an issue for that.
Originally posted by @dwijnand in #7128 (comment)
The text was updated successfully, but these errors were encountered: