codegen: handle exceptions of a method
[mate.git] / tests / Static8.java
1 package tests;
2
3 public class Static8 extends Static8_local {
4         public static int x;
5         public static int y;
6
7         static {
8                 Static8_local.x = 0x1337;
9                 Static8_local.y = 0x555;
10         }
11
12         public static void main(String []args) {
13                 System.out.printf("result: 0x%08x\n", Static8.addNumbers()); // 0x188c
14         }
15 }
16
17 class Static8_local {
18         public static int x;
19         public static int y;
20
21         static {
22                 Static8_local.x = 0x11;
23                 Static8_local.y = 0x22;
24                 System.out.printf("result: 0x%08x\n", addNumbers()); // 0x33
25         }
26
27         public static int addNumbers() {
28                 return Static8_local.x + Static8_local.y;
29         }
30 }