Closed DarinM223 closed 1 month ago
Also reversing the order of the multi case arm as in case MyType.B(_), MyType.A() -> {}
is accepted. This can be the workaround for the time being.
Problem is observable on 4.32 as well as 4.31 (with preview enabled)
See also https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2070 - very likely the same or closely related problem
This code:
works in IntelliJ with OpenJDK 22 but in Eclipse 4.33 using the Eclipse compiler it gives the error messages:
It seems that this may be because a wildcard pattern is used inside of an or pattern. Expanding the or pattern like:
results in no compile errors.