codegen: handle exceptions of a method
[mate.git] / tests / Instance4.java
index 0ecd257fa5437201d993c55324364e5ebf3ffc8c..8707502c18ce8210e14da5e268850295b2426cc2 100644 (file)
@@ -1,19 +1,20 @@
 package tests;
 
-public class Instance4 extends Instance2 {
+public class Instance4 {
+       public int a, b;
+
        public Instance4() {
-               x = 0x11;
-               y = 0x22;
+               this(0x666, 0x1337);
        }
 
-       public static void main(String []args) {
-               Instance2 a = new Instance4();
-               a.getX(); // 0x1337
-               Instance4 b = (Instance4) a;
-               b.getX(); // 0x1337;
+       public Instance4(int x, int y) {
+               this.a = x;
+               this.b = y;
        }
 
-       public int getX() {
-               return 0x1337;
+       public static void main(String []args) {
+               Instance4 x = new Instance4();
+               System.out.printf("result: 0x%08x\n", x.a);
+               System.out.printf("result: 0x%08x\n", x.b);
        }
 }