From f86e714a4fdebb994101813a5fa6664f5883a0ab Mon Sep 17 00:00:00 2001 From: bd-912 Date: Thu, 9 May 2024 00:36:50 -0600 Subject: Many final bug-fixes in heat visitor, symbol table --- output/negative/WrongAllocate-error1.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 output/negative/WrongAllocate-error1.java (limited to 'output/negative/WrongAllocate-error1.java') diff --git a/output/negative/WrongAllocate-error1.java b/output/negative/WrongAllocate-error1.java new file mode 100644 index 0000000..072ac98 --- /dev/null +++ b/output/negative/WrongAllocate-error1.java @@ -0,0 +1,23 @@ +class WrongAllocate { + public static void main(String[] z) { + A a ; + B b ; + a = new B() ; + b = new A() ; + System.out.println(12) ; + } +} + +class A { + + public int get_tt() { + return 32 ; + } + +} + +class B extends A { + + int useless ; + +} -- cgit v1.2.3