Question
Is there support for the Java Valhalla syntax or specific configurations available in IntelliJ IDEA?
Sample code:
public class Main {
// Pulled verbatim from https://github.com/openjdk/valhalla/blob/lworld/test/jdk/valhalla/valuetypes/WeakReferenceTest.java
static value class Value {
}
public static void main(String[] args) {
Value v = new Value();
System.out.println(v); // expected output (# = hash hex): net.flamgop.Main$Value@########
}
}
Answer
IntelliJ IDEA introduces syntax support for the experimental Java version Valhalla in version 2025.1 Beta. To utilize this functionality:
- Update your IntelliJ IDEA to version 2025.1 or later.
- Set your project's language level within the Project Structure settings to X - Experimental Features to enable the Valhalla syntax support.
If issues persist or additional configurations are required, ensure your IDE is updated to the latest version and consult the related documentation or support resources.
Ref:
Comments
0 comments
Please sign in to leave a comment.