PR# 16701 valid_operands has incorrect logic

Problem Report Summary
Submitter: lengthe
Category: EiffelBase
Priority: Medium
Date: 2010/04/20
Class: Bug
Severity: Serious
Number: 16701
Release: 6.5.8.2162
Confidential: No
Status: Analyzed
Responsible:
Environment: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 (.NET CLR 3.5.30729)
Synopsis: valid_operands has incorrect logic

Description
Maybe I am missing something ...

In `valid_operands' the logic is faulty when one of the types is a basic type and the other is a reference type. For example, INTEGER conforms to COMPARABLE. I think the problem is that `valid_operands' is checking the type of the "slot" in the TUPLE, rather than the the type of the actual object instance in that slot, and is furthermore simply short-circuiting when onetype is a reference and the other isn't.

I have commented out four lines in ROUTINE that seem unnecessary.

Thanks,
Theo
To Reproduce
Refer to the contents of "routine_valid_operands_failure.e"
Problem Report Interactions
From:manus_eiffel    Date:2010/04/20    Status: Analyzed    Download   
Have you verified that at runtime it works properly? Our understanding is that it might not always work in our implementation and thus the restriction at the level of `valid_operands'.

From:lengthe    Date:2010/04/20    Download   
Attachments for problem report #16701

Attachment: routine.e     Size:11722
Attachment: routine_valid_operands_failure.e     Size:651