Java: Accept dispatch precision improvement.

This commit is contained in:
Anders Schack-Mulligen
2026-02-12 10:33:58 +01:00
parent 4d9c0e0c26
commit a72cf56a05
2 changed files with 2 additions and 4 deletions

View File

@@ -25,7 +25,7 @@ public class Test {
switch(i) {
case C1 c1 -> { }
case null, default -> i.take(source()); // Can't call C1.take (but we don't currently notice)
case null, default -> i.take(source()); // Can't call C1.take
}
switch(i) {
@@ -55,7 +55,7 @@ public class Test {
switch(i) {
case C1 c1: break;
case null: default: i.take(source()); // Can't call C1.take (but we don't currently notice)
case null: default: i.take(source()); // Can't call C1.take
}
switch(i) {

View File

@@ -5,7 +5,6 @@
| Test.java:23:25:23:32 | source(...) | Test.java:8:65:8:65 | x |
| Test.java:23:25:23:32 | source(...) | Test.java:9:74:9:74 | x |
| Test.java:23:25:23:32 | source(...) | Test.java:10:82:10:82 | x |
| Test.java:28:36:28:43 | source(...) | Test.java:7:65:7:65 | x |
| Test.java:28:36:28:43 | source(...) | Test.java:8:65:8:65 | x |
| Test.java:28:36:28:43 | source(...) | Test.java:9:74:9:74 | x |
| Test.java:28:36:28:43 | source(...) | Test.java:10:82:10:82 | x |
@@ -26,7 +25,6 @@
| Test.java:53:25:53:32 | source(...) | Test.java:8:65:8:65 | x |
| Test.java:53:25:53:32 | source(...) | Test.java:9:74:9:74 | x |
| Test.java:53:25:53:32 | source(...) | Test.java:10:82:10:82 | x |
| Test.java:58:34:58:41 | source(...) | Test.java:7:65:7:65 | x |
| Test.java:58:34:58:41 | source(...) | Test.java:8:65:8:65 | x |
| Test.java:58:34:58:41 | source(...) | Test.java:9:74:9:74 | x |
| Test.java:58:34:58:41 | source(...) | Test.java:10:82:10:82 | x |