File: t.h
struct Point {
int x;
int y;
};
File: Main.java
import com.acme.t_h.Point;
class Main {
public static void main(String[] args) {
try (var pt = Point.allocate()) {
Point.x$set(pt, 10);
Point.y$set(pt, 43);
System.out.println(Point.x$get(pt));
System.out.println(Point.y$get(pt));
}
}
}
expected output:
10
43
output seen:
43
43
See also:
https://mail.openjdk.java.net/pipermail/panama-dev/2020-August/010386.html
struct Point {
int x;
int y;
};
File: Main.java
import com.acme.t_h.Point;
class Main {
public static void main(String[] args) {
try (var pt = Point.allocate()) {
Point.x$set(pt, 10);
Point.y$set(pt, 43);
System.out.println(Point.x$get(pt));
System.out.println(Point.y$get(pt));
}
}
}
expected output:
10
43
output seen:
43
43
See also:
https://mail.openjdk.java.net/pipermail/panama-dev/2020-August/010386.html
- duplicates
-
JDK-8252563 Field VarHandle generation in --source mode is missing the PathElement.groupElement argument
-
- Resolved
-