When I compile this program with the modified javac to produce class files that are conformant with the outline in https://cr.openjdk.java.net/~briangoetz/valhalla/sov/04-translation.html:
public inline class Point {
private int x;
private int y;
public Point(int x, int y) {
this.x = x;
this.y = y;
}
public static void main(String [] args) {
Point.ref pref = new Point(10, 20);
System.out.println(pref);
}
}
I get two class files: Point.class and Point$ref.class.
Running them to jvm I get good behavior.
A slightly modified version of the program above triggers a verification error - don't know why
public inline class Point {
private int x;
private int y;
public Point(int x, int y) {
this.x = x;
this.y = y;
}
public static void main(String [] args) {
Point.ref pref = new Point(10, 20);
System.out.println(pref);
}
}
I get two class files: Point.class and Point$ref.class.
Running them to jvm I get good behavior.
A slightly modified version of the program above triggers a verification error - don't know why