JDK-8243116 : [lworld] JVM should allow inline classes to declare super classes other than jlO
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: repo-valhalla
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2020-04-19
  • Updated: 2020-05-01
  • Resolved: 2020-04-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
repo-valhallaFixed
Related Reports
Blocks :  
Description
http://cr.openjdk.java.net/~briangoetz/valhalla/sov/

The latest set of documents from here allow an inline class to mention a super class other than jlO:

Supertypes
Inline classes can implement interfaces. They cannot extend arbitrary classes, but they can extend a limited category of abstract classes ��� those with no fields, empty no-arg constructor bodies, no other constructors, no instance initializers, no synchronized methods, and whose superclasses all meet this same set of conditions (Object and Number are examples of such classes.)

While the full spec may take a while to implement, may I request that the check for only jlO being allowed as a super class be relaxed to allow any abstract class to begin with and then tighten the requirements per above ??

Otherwise, it would block langtools from testing ... TIA
Comments
Changeset: e4e93d77 Author: Harold Seigel <hseigel@openjdk.org> Date: 2020-04-20 20:28:33 +0000 URL: https://git.openjdk.java.net/valhalla/commit/e4e93d77 allow inline classes to have abstract supers Reviewed-by: fparain ! src/hotspot/share/classfile/classFileParser.cpp ! src/hotspot/share/classfile/verificationType.cpp ! test/hotspot/jtreg/runtime/valhalla/valuetypes/classfileparser/BadValueTypes.java
20-04-2020

X.class and X$ref.class generated for public inline class X { Object o = new X(); public static void main(String [] args) { } } using an enhanced version of javac. When running X.class under Valhalla VM I get: Error: LinkageError occurred while loading main class X java.lang.ClassFormatError: Inline type must have java.lang.Object as superclass in class file X
20-04-2020