// ObjComp class foo { Int y; } class bar { Int h; } class bof extends bar {} class ObjCompTest { Null foo() { bar b = new bar(1); bof z = new bof(1); foo f = new foo(2); f + b; // 1/5 failure of clause 1 (binop not == or !=) k == b; // 2/5 failure of clause 2 (nonexistent ident) b == l; // 3/5 failure of clause 2 (nonexistent ident) f == b; // 4/5 failure of clause 3 (subtype mismatch) b == f; // 5/5 failure of clause 3 (subtype mismatch) z == b; // success } } 1