Stephan Bergmann wrote:
3 Incorporate Daniel's fix and change the rules so that extracting a null reference of interface type T1 to a reference of interface type T2 succeeds if and only if T1 is derived from T2. That is, the list would become
b1: false x1: unmodified b2: true x2: null b2a: true x2a: null b2b: false x2b: unmodified
4 Incorporate Daniel's fix and change the rules so that extracting a null reference of interface type T1 to a reference of interface type T2 always succeeds, independent of T1 and T2. That is, the list would become
b1: true x1: null b2: true x2: null b2a: true x2a: null b2b: true x2b: null
I favor the fourth solution, and would suggest implementing it for OOo 2.0, even though it has the slight potential of breaking existing code (as some of the b's would change).
I would prefer the 3rd solution. What are the drawbacks of this? At least it comes very close to the expectation I would have without knowing the current implementation.
I just commited a fix using the fourth solution, for the following list or reasons (probably in decreasing order of relevance): :)
- At least for the x's, 4 comes closer to the original behavior than 3.
- "Be liberal in what you accept" can be considered to apply here.
- I still think it is a bad idea to have >>= behave strictly statically for null references, and dynamically for non-null references.
- Running the smoketest, there are only two situations where a null ref of base type is extracted to a derived type, and no situations at all where a null ref of one type is extracted to another, unrelated type. So, maybe this issue is not that important, anyway.
- It was easier to implement 4 than 3.
-Stephan
Best regards, Mathias
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
