mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
switch expression: display dedicated error on target type void (IDEA-203776)
This commit is contained in:
+4
@@ -103,5 +103,9 @@ no instance(s) of type variable(s) exist so that Integer conforms to String">()
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Runnable r = () -> <error descr="Target type for switch expression cannot be void">switch</error>(0) {
|
||||
default -> throw new IllegalArgumentException();
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user