Fixing tests

This commit is contained in:
Jan Lahoda 2025-10-20 07:38:00 +02:00
parent dad7c56b7d
commit b79bce1f40
3 changed files with 9 additions and 3 deletions

View File

@ -602,9 +602,13 @@ class Example implements Comparable<Example> {
*/
private static void scanForKeys(JCDiagnostic d, Set<String> keys) {
keys.add(d.getCode());
for (Object o: d.getArgs()) {
if (o instanceof JCDiagnostic) {
scanForKeys((JCDiagnostic) o, keys);
List<Object> todoArgs = new ArrayList<>(Arrays.asList(d.getArgs()));
while (!todoArgs.isEmpty()) {
Object o = todoArgs.removeLast();
if (o instanceof JCDiagnostic sd) {
scanForKeys(sd, keys);
} else if (o instanceof List l) {
todoArgs.addAll(l);
}
}
for (JCDiagnostic sd: d.getSubdiagnostics())

View File

@ -22,6 +22,7 @@
*/
// key: compiler.err.not.exhaustive.details
// key: compiler.misc.not.exhaustive.detail
// options: -XDexhaustivityTimeout=-1
class NotExhaustiveDetails {

View File

@ -22,6 +22,7 @@
*/
// key: compiler.err.not.exhaustive.statement.details
// key: compiler.misc.not.exhaustive.detail
// options: -XDexhaustivityTimeout=-1
class NotExhaustiveDetails {