inline record ref projection contains an empty record attribute
    Remi Forax 
    forax at univ-mlv.fr
       
    Wed Dec  2 12:18:06 UTC 2020
    
    
  
Hi all,
using this inline record
public @__inline__ record IntBox(int value) {}
When the compiler generates the ref projection, IntBox$Ref, an empty attribute "Record" is generated which i believe is a mistake.
The ref projection should not contains that attribute at all.
regards,
Rémi
---
Classfile /home/forax/git/transmogrif/target/classes/fr/umlv/transmogrif/IntBox$ref.class
  Last modified Dec 2, 2020; size 222 bytes
  SHA-256 checksum 2ee826fe2e8735044ea2a7f9e766aa101a7786385b5d27291864e7e4d550d6e2
  Compiled from "IntBox.java"
public abstract class fr.umlv.transmogrif.IntBox$ref extends java.lang.Record
  minor version: 0
  major version: 60
  flags: (0x0421) ACC_PUBLIC, ACC_SUPER, ACC_ABSTRACT
  this_class: #1                          // fr/umlv/transmogrif/IntBox$ref
  super_class: #3                         // java/lang/Record
  interfaces: 0, fields: 0, methods: 0, attributes: 4
Constant pool:
   #1 = Class              #2             // fr/umlv/transmogrif/IntBox$ref
   #2 = Utf8               fr/umlv/transmogrif/IntBox$ref
   #3 = Class              #4             // java/lang/Record
   #4 = Utf8               java/lang/Record
   #5 = Utf8               SourceFile
   #6 = Utf8               IntBox.java
   #7 = Utf8               NestMembers
   #8 = Class              #9             // fr/umlv/transmogrif/IntBox
   #9 = Utf8               fr/umlv/transmogrif/IntBox
  #10 = Utf8               Record                                     <------------ oops
  #11 = Utf8               PermittedSubclasses
{
}
SourceFile: "IntBox.java"
NestMembers:
  fr/umlv/transmogrif/IntBox
PermittedSubclasses:
  fr/umlv/transmogrif/IntBox
Record:
[forax at localhost transmogrif]$ javap -private -c -verbose target/classes/fr/umlv/transmogrif/IntBox\$ref.class 
Classfile /home/forax/git/transmogrif/target/classes/fr/umlv/transmogrif/IntBox$ref.class
  Last modified Dec 2, 2020; size 222 bytes
  SHA-256 checksum 2ee826fe2e8735044ea2a7f9e766aa101a7786385b5d27291864e7e4d550d6e2
  Compiled from "IntBox.java"
public abstract class fr.umlv.transmogrif.IntBox$ref extends java.lang.Record
  minor version: 0
  major version: 60
  flags: (0x0421) ACC_PUBLIC, ACC_SUPER, ACC_ABSTRACT
  this_class: #1                          // fr/umlv/transmogrif/IntBox$ref
  super_class: #3                         // java/lang/Record
  interfaces: 0, fields: 0, methods: 0, attributes: 4
Constant pool:
   #1 = Class              #2             // fr/umlv/transmogrif/IntBox$ref
   #2 = Utf8               fr/umlv/transmogrif/IntBox$ref
   #3 = Class              #4             // java/lang/Record
   #4 = Utf8               java/lang/Record
   #5 = Utf8               SourceFile
   #6 = Utf8               IntBox.java
   #7 = Utf8               NestMembers
   #8 = Class              #9             // fr/umlv/transmogrif/IntBox
   #9 = Utf8               fr/umlv/transmogrif/IntBox
  #10 = Utf8               Record
  #11 = Utf8               PermittedSubclasses
{
}
SourceFile: "IntBox.java"
NestMembers:
  fr/umlv/transmogrif/IntBox
PermittedSubclasses:
  fr/umlv/transmogrif/IntBox
Record:                                 <------------------------ oops
    
    
More information about the valhalla-dev
mailing list