How do we enable the new 2.1 experimental option f...
# getting-started
k
How do we enable the new 2.1 experimental option for "when" guards? I couldn't find it in the KEEP or the "What's New".
e
if you try using them, the compiler should emit
Copy code
error: the feature "when guards" is experimental and should be enabled explicitly. This can be done by supplying the compiler argument '-Xwhen-guards', but note that no stability guarantees are provided.
👍 1
k
Thanks. I didn't see that because the error message in the IDE (IntelliJ IDEA 2024.3) only shows the first sentence.
l
You need to enable K2.
1
249 Views