[lworld] RFR: 8244231: [lworld] Add support for ref-default and val-default inline classes.

Srikanth Adayapalam sadayapalam at openjdk.java.net
Thu Jul 22 08:13:58 UTC 2021


On Wed, 21 Jul 2021 13:27:38 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Code changes and tests
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java line 4674:
> 
>> 4672:                     // reflect this.
>> 4673:                     if (sym.isPrimitiveClass()) {
>> 4674:                         if (sym.isReferenceFavoringPrimitiveClass()) {
> 
> Shouldn't we simplify this to try and use `asValueType` - probably this suggests there should be an `asReferenceType` too?

ATM, we have com.sun.tools.javac.code.Type#referenceProjection()

Again, I will use JDK-8268734 to rationalize the various internal APIs we have - while doing so, also looking at choice of terminology adopted by java.lang.Class  

But I didn't understand the comment about the simplification you are suggesting - can you clarify ?

-------------

PR: https://git.openjdk.java.net/valhalla/pull/482


More information about the valhalla-dev mailing list