summaryrefslogtreecommitdiffstats
path: root/tests/bugs/TrySwitch.java
blob: b767f09bc70076a5c992a6323f35e7502227d778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
public class TrySwitch {
	public static void main(String[] args) throws Throwable {
		m(10);
	}
	
	static boolean done = true;
	static int m(int i) {
		try {
			switch(i) {
				default: return 10;
				case 10:
					if (false) { 
						break;
					} else {
						throw new RuntimeException();
					}
				case 11: break;
			}
		} catch (Throwable e) {
			System.err.println("caught: " + e);
		}
		return 33;
	}
}