mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] change wording in the error for outdated patterns
GitOrigin-RevId: 5a0107985349b49236cae90c1ed82bda1aa43651
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b6e8770e45
commit
c99e74d9b4
@@ -266,7 +266,7 @@ switch.statement.incomplete='switch' statement does not cover all possible input
|
||||
switch.expr.no.result=Switch expression does not have any result expressions
|
||||
switch.expr.should.produce.result=Switch expression should produce result in all execution paths
|
||||
switch.expr.rule.should.produce.result=Switch expression rule should produce result in all execution paths
|
||||
guarded.patterns.unavailable=Guarded patterns and parenthesized patterns are not available since Java 19 preview
|
||||
guarded.patterns.unavailable=Old patterns from JEP 406 are not available since Java 19 preview
|
||||
|
||||
illegal.forward.reference=Illegal forward reference
|
||||
illegal.self.reference=Illegal self reference
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
class X {
|
||||
int switchTest(Object obj) {
|
||||
return switch (obj) {
|
||||
case <error descr="Guarded patterns and parenthesized patterns are not available since Java 19 preview">(String s)</error> -> 1;
|
||||
case <error descr="Guarded patterns and parenthesized patterns are not available since Java 19 preview">Integer i && predicate()</error> -> 2;
|
||||
case <error descr="Old patterns from JEP 406 are not available since Java 19 preview">(String s)</error> -> 1;
|
||||
case <error descr="Old patterns from JEP 406 are not available since Java 19 preview">Integer i && predicate()</error> -> 2;
|
||||
case Integer i -> 3;
|
||||
case default -> 4;
|
||||
case null -> 10;
|
||||
@@ -10,10 +10,10 @@ class X {
|
||||
}
|
||||
|
||||
int instanceofTest(Object obj) {
|
||||
if (obj instanceof (<error descr="Guarded patterns and parenthesized patterns are not available since Java 19 preview">Integer i && predicate()</error>)) {
|
||||
if (obj instanceof (<error descr="Old patterns from JEP 406 are not available since Java 19 preview">Integer i && predicate()</error>)) {
|
||||
return 1;
|
||||
}
|
||||
if (obj instanceof <error descr="Guarded patterns and parenthesized patterns are not available since Java 19 preview">(String s)</error>) {
|
||||
if (obj instanceof <error descr="Old patterns from JEP 406 are not available since Java 19 preview">(String s)</error>) {
|
||||
return 3;
|
||||
}
|
||||
return 2;
|
||||
|
||||
Reference in New Issue
Block a user