Simplifying 'value' and 'identity'

Dan Smith daniel.smith at oracle.com
Mon Dec 18 16:15:13 UTC 2023



> On Dec 18, 2023, at 3:03 AM, Maurizio Cimadamore <Maurizio.Cimadamore at oracle.com> wrote:
> 
> On 15/12/2023 20:22, Dan Smith wrote:
>> it's just an assertion about the abstract class itself (and its supers)
> 
> I think the rules here have to say something more about what a value abstract class can and cannot extend? E.g. I suppose (hope) this is invalid:
> ```java
> class Foo { ... }
> value abstract Bar extends Foo { ... }
> ```
> Is this what you mean by 
> 
>> (and its supers)
> ?

Yes, that's right. The rule is that a value class must extend another value class (necessarily abstract), or Object.


More information about the valhalla-spec-experts mailing list