mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 01:09:46 +07:00
[java] Unnamed variables
IDEA-323910 Implement parser for "JEP 443: Unnamed Patterns and Variables (Preview)" IDEA-323960 Support error highlighting for unnamed variables (JEP 443) GitOrigin-RevId: 1b9ee424063dfd4d32c2215fc8b0a9838dbdcd95
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9fb2a08303
commit
a41ef84fea
@@ -2,7 +2,7 @@ public class UnnamedPatterns {
|
||||
record R(int a, int b) {}
|
||||
|
||||
void test(Object obj) {
|
||||
if (obj instanceof <error descr="As of Java 9, '_' is a keyword, and may not be used as an identifier">_</error>) {}
|
||||
if (obj instanceof <error descr="Since Java 9, '_' is a keyword, and may not be used as an identifier">_</error>) {}
|
||||
|
||||
if (obj instanceof R(_, _)) {}
|
||||
if (obj instanceof R(int a, _)) {
|
||||
|
||||
@@ -2,7 +2,7 @@ public class UnnamedPatterns {
|
||||
record R(int a, int b) {}
|
||||
|
||||
void test(Object obj) {
|
||||
if (obj instanceof <error descr="As of Java 9, '_' is a keyword, and may not be used as an identifier">_</error>) {}
|
||||
if (obj instanceof <error descr="Since Java 9, '_' is a keyword, and may not be used as an identifier">_</error>) {}
|
||||
|
||||
if (obj instanceof R(<error descr="Unnamed patterns and variables are not supported at language level '20'">_</error>, <error descr="Unnamed patterns and variables are not supported at language level '20'">_</error>)) {}
|
||||
if (obj instanceof R(int a, <error descr="Unnamed patterns and variables are not supported at language level '20'">_</error>)) {
|
||||
|
||||
Reference in New Issue
Block a user