Skip to content
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

Missing Object parent in macro #14

Closed
nicolasstucki opened this issue Mar 4, 2024 · 0 comments
Closed

Missing Object parent in macro #14

nicolasstucki opened this issue Mar 4, 2024 · 0 comments

Comments

@nicolasstucki
Copy link

The parent was added to the symbol but not the tree

https://github.com/frugalmechanic/fm-serializer/blob/e4ae0efc9efe80b15ea1935822a2bcaff6764e6a/src/main/scala-3/fm/serializer/MacroHelpers.scala#L837

https://github.com/frugalmechanic/fm-serializer/blob/e4ae0efc9efe80b15ea1935822a2bcaff6764e6a/src/main/scala-3/fm/serializer/MacroHelpers.scala#L853

To fix do

- ClassDef.module(modSym, List(TypeTree.of[Serializer[T]]), body) 
+ ClassDef.module(modSym, List(TypeTree.of[Object], TypeTree.of[Serializer[T]]), body) 

There are 4 cases where ClassDef.module should be fixed.

This was found in scala/scala3#19842

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant