class foo {}
class bar extends foo {}
class baz {}
// Set
class SetTest {
Null foo() {
Int n = 1;
bar b = new bar();
s = 2; // 1/3 failure of clause 1 (nonexistent variable)
n = new foo(); // 2/3 failure of clauses 2 and 3 (subtype mismatch)
b = new foo(); // 3/3 failure of clauses 2 and 3 (inverted sub- and supertypes)
b = new bar(); // success
}
}
1