TypeInfo#isDerivedFrom

If type A is derived indirectly from type B by a sequence of steps that
includes both restriction and extension, what result should
A.isDerivedFrom(B, x) return where:

(a) x is 0
(b) x is DERIVATION_EXTENSION
(c) x is DERIVATION_RESTRICTION
(d) x is DERIVATION_EXTENSION | DERIVATION_RESTRICTION

The answer to (a) seems to be clearly documented as TRUE. I can't find an
explanation of what the other three cases should return.

Obviously the result of (b) and (c) should be the same, and the spec does
say that the result of (d) should be the result of b OR c, so it boils down
to the question, what does (b) return?

Michael Kay

Received on Monday, 9 August 2004 09:02:48 UTC