-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Regression for frugalmechanic/fm-serializer in quotes-reflect + -Xcheck-macros #19842
Comments
The purpose of the check added in #18935 was to add a guarantee that the parents in the symbol are consistent with the parents in the tree. The following change would make the code compile again. - val (modValDef: ValDef, modClassDef: ClassDef) =
- ClassDef.module(modSym, List(TypeTree.of[Serializer[T]]), Nil)
+ val (modValDef: ValDef, modClassDef: ClassDef) =
+ ClassDef.module(modSym, List(TypeTree.of[Object], TypeTree.of[Serializer[T]]), Nil) We can maybe loose a bit the test and assume that if the symbol has cc @nicolasstucki for advice on how to proceed. |
All other trees at this point have the This is a bug in the implementation of the macro that was caught by the new check. The bug should be fixed (not hidden). |
It also seems that all uses of |
I opened an issue in their repo: tpunder/fm-serializer#14 |
I've forked the repository to fix it and submit a PR, but opening an issue might be sufficient. |
Here is a PR: tpunder/fm-serializer#15 |
PR has been merged. Thanks for identifying the issue and providing the fix! |
Based on OpenCB failure of
frugalmechanic/fm-serializer
- build logsUnder -Xcheck-macros flag we get an error about different sets of parents - the parents of tree don't include
class Object
which is present in parents of symbol being created. Removing theclass Object
from list of parents leads to assertion error in the compiler, becouse it requires the first param to be a class, not a trait.Compiler version
3.4.nightly
Last good release: 3.4.1-RC1-bin-20240210-6efcdba-NIGHTLY
First bad release: 3.4.1-RC1-bin-20240212-c529a48-NIGHTLY
Bisect points to aa5492f
Minimized code
Output
Expectation
Probably should not couse comilation error.
The text was updated successfully, but these errors were encountered: