2021-07-07 07:26:41 +00:00
|
|
|
/*
|
|
|
|
* @test /nodynamiccopyright/
|
|
|
|
* @bug 8268320
|
|
|
|
* @summary Verify user-friendly errors are reported for ill-formed pattern.
|
2022-11-17 00:49:53 +00:00
|
|
|
* @compile/fail/ref=PatternErrorRecovery.out -XDrawDiagnostics -XDshould-stop.at=FLOW --enable-preview -source ${jdk.version} PatternErrorRecovery.java
|
2021-07-07 07:26:41 +00:00
|
|
|
* @compile/fail/ref=PatternErrorRecovery-no-preview.out -XDrawDiagnostics -XDshould-stop.at=FLOW PatternErrorRecovery.java
|
|
|
|
*/
|
|
|
|
public class PatternErrorRecovery {
|
|
|
|
void errorRecoveryNoPattern1(Object o) {
|
|
|
|
switch (o) {
|
|
|
|
case String: break;
|
|
|
|
case Object obj: break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|