Superclasses with fields

Thiago Henrique Hupner thihup at gmail.com
Mon Aug 21 11:03:58 UTC 2023


Now that most of the migration issues from classes to value classes have
been discovered, would it also be possible to allow maybe a subset of
superclasses that contains some fields?

Probably having "value enums" would be great, but also it would enable to
have subclasses of j.u.AbstractList to also become value classes.

Probably there are more issues to it than I could remember, but wouldn't it
be possible to check at load time if the superclass uses some
unsupported features, like synchronized methods, and throw an error?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-spec-comments/attachments/20230821/d240ca8a/attachment.htm>


More information about the valhalla-spec-comments mailing list