-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: 17
-
Component/s: tools
-
b28
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
|---|---|---|---|---|---|---|
| JDK-8269440 | 18 | Jan Lahoda | P3 | Resolved | Fixed | b04 |
| JDK-8270627 | 17.0.1 | Jan Lahoda | P3 | Resolved | Fixed | b03 |
Consider code like:
```
case (String s) && !s.isEmpty():
```
This is a guarded pattern, where the nested pattern is parenthesized. But javac won't parse this code:
$ javac Test.java
Test.java:4: error: : or -> expected
case (String s) && !s.isEmpty():
^
...errors continue....
```
case (String s) && !s.isEmpty():
```
This is a guarded pattern, where the nested pattern is parenthesized. But javac won't parse this code:
$ javac Test.java
Test.java:4: error: : or -> expected
case (String s) && !s.isEmpty():
^
...errors continue....
- backported by
-
JDK-8269440 Parenthesized pattern with guards does not work
-
- Resolved
-
-
JDK-8270627 Parenthesized pattern with guards does not work
-
- Resolved
-