-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Macro dependencies are tracked incorrectly in some cases #16420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Compiler marks 'Meow' as dependency due to that TreesRaw AST:
Code: (using evidence$1: quoted.Quotes) =>
Converter.inline$handleUnit[Meow.Meow](
'{(using evidence$2: Int) =>
{
{
Meow.Meow.apply("asd", 123)
}
}
}.apply(evidence$1)
)(evidence$1, quoted.Type.of[Meow.Meow](evidence$1)) Note, however, that When issue does not reproduce (with same code), trees look a bit different: TreesRaw AST:
(decompiled code is same) Note that Breaks:
Works:
|
This is already fixed on the main branch. It will work on |
Compiler version
3.2.0
Minimized code
Bug reproduces only when two files are in different source sets (i.e.
Directive
is in main andMeow
is in test).SBT project that reproduces this problem is prepared here. Clone it and do
sbt root/test:compile
.directive.scala:
meow.scala:
Output
In other circumstances, it does not fails with "Cannot call macro class ... defined in same source file", but fails with "Cyclic macro dependencies in Meow.scala", implying that Meow depends on itself.
Expectation
Code should compile and run
The text was updated successfully, but these errors were encountered: