[records] Native members

Remi Forax forax at univ-mlv.fr
Wed Oct 9 22:09:49 UTC 2019

----- Mail original -----
> De: "Brian Goetz" <brian.goetz at oracle.com>
> À: "amber-spec-experts" <amber-spec-experts at openjdk.java.net>
> Envoyé: Mercredi 9 Octobre 2019 23:10:40
> Objet: [records] Native members

> Jon has pointed out that it is possible to declare a record with native
> methods and/or constructor.
> Let's just add `native` to the set of modifiers that are not allowed on
> members of records....

You have not provided a rational, maybe there is an obvious reason that i can not see ?
For me, it's fine to have a private static native method inside a record.

Obviously, having native method which is an instance method or a constructor is a bad idea but it's a bad idea for classes, interfaces and records, so i don't see why we should fix that for record without fixing it for classes and interfaces too.


More information about the amber-spec-experts mailing list