class A
	begin
		int field1, field2;
		void aInstance1()
			begin
				printf( "aInstance1\n" );
			end
		void override1()
			begin
				printf( "A override1\n" );
			end
		void override2()
			begin
				printf( "A override2\n" );
			end
		void aInstance2()
			begin
				printf( "aInstance2\n" );
			end
	end

class B extends A
	begin
		int field3, field4;
		void bInstance1()
			begin
				printf( "bInstance1\n" );
			end
		void override1()
			begin
				printf( "B override1\n" );
			end
		void bInstance2()
			begin
				printf( "bInstance2\n" );
			end
		void override2()
			begin
				printf( "B override2\n" );
			end
	end

B b;
^A a = b;
a.aInstance1();
a.override1();
a.override2();
a.aInstance2();
