I am trying to build a project with JDK-12 ea. While trying to execute a sample class:
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int value = scanner.nextInt();
// After JEP-325
switch (value) {
case 1 ->System.out.println("one");
case 2 ->System.out.println("two");
default ->System.out.println("many");
}
}
The IDE throws the error that reads
Error:java: error: invalid source release: 13
Relevant project configuration screens :
Module settings
SDKs
Compiler settings
IntelliJ IDEA 2018.3.3 (Community Edition) Build #IC-183.5153.38, built on January 9, 2019 JRE: 1.8.0_152-release-1343-b26 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.13.6
Tried switching back the language level to 12, without experimental features, but it ends in
I remember using the experimental features in recent past(not sure of exact IntelliJ version) successfully. Has something changed that I need to configure apart from this as well?