CodeGenerator should be able to generate basic code for records#7581
Conversation
|
In addition to your changes to the |
@dbalek thanks for the hint! I believe this was the missing piece why I could not figure out why it kept generating final classes. I will give this another attempt. |
|
this would be a bit more work, due to the fact that I think we could get this into NB 23 so that is generates the record as final class instead of throwing an exception. It can be still properly implemented later. |
generates a final class as workaround instead of throwing an exception
88d1ea4 to
3c0f522
Compare
generates a final class as workaround instead of throwing an exception
fixes #7570 (see for reproducer)
So i tried to implement this properly at first, but there is some magic behind the scenes in the javac impl which kept generating final classes even though everything seemed to be correct. I had this in
TreeFactorywhich works analog toEnum:since this had no effect, I decided to change this back to a minimal impact quickfix which simply calls
make.Classright away, without introducing public API changes. This would also have to be updated to extendAbstractElementVisitor14as the todo indicates.Edit: I might give this a second attempt to implement it properly