It seems there is an issue with the scope of pattern variables in switch branches. In the following, the variable array
is undefined in the RHS of the branch:
return switch (foo) { case char[] array -> new String(array); case String string -> string; default -> throw new Exception(); };
Originally posted by @boris-petrov in #4874 (comment)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4