
interface GenericsTest3IA {
    GenericsTest3IA(int a, int b);

    int get_field1();
    int get_field2();
}

class GenericsTest3ClassC implements GenericsTest3IA {
    int field1;
    int field2;

    GenericsTest3ClassC(int a, int b) {
        self.field1 = a;
        self.field2 = b;
    }

    int get_field1() {
        return self.field1;
    }

    int get_field2() {
        return self.field2;
    }
}

class GenericsTest3ClassD extends GenericsTest3ClassC {
    GenericsTest3ClassD(int a, int b) {
        super(a, b);
    }
}

class TestGenerics2 <T implements GenericsTest3IA, T2 implements GenericsTest3IA> {
    void call_method1() {
        T a = new T(111,222);

        print("TestGenerics3 test1...");
        if(a.get_field1() == 111 && a.get_field2() == 222) {
            println("TRUE");
        }
        else {
            println("FALSE");
            System.exit(1);
        }

        T2 b = new T2(333,444);

        print("TestGenerics3 test2...");
        if(b.get_field1() == 333 && b.get_field2() == 444) {
            println("TRUE");
        }
        else {
            println("FALSE");
            System.exit(1);
        }
    }
}
