Convert test to use an anonymous local

This commit is contained in:
Chris Smowton
2024-03-22 16:12:29 +00:00
parent ee36e3b72b
commit cc8dcf63b0
4 changed files with 12 additions and 12 deletions

View File

@@ -14,7 +14,7 @@ class Test {
}
int len = s.length();
switch (s) {
case String s2 when len == 4 -> { }
case String _ when len == 4 -> { }
case "e" -> { }
default -> { }
}