PR# 18503 Semantics of equality does notmatch the standard
Problem Report Summary
Submitter: alexk_es
Category: EiffelStudio
Priority: Medium
Date: 2013/02/04
Class: Bug
Severity: Serious
Number: 18503
Release: 7.2.9.587
Confidential: No
Status: Analyzed
Responsible:
Environment: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Synopsis: Semantics of equality does notmatch the standard
Description
According to the standard, equality of expanded types means a result of is_equal. It does not say that the types need to be the same. As a result it's possible that (a=b)/=(b=a) if types of a and b are different and define is_equal in a different way. This may need to be fixed in the standard, but so far this is a bug in the implementation.
To Reproduce
test#exec353
Problem Report Interactions
According to the standard The Boolean_expression e ~ f has value true if and only if the values of e and f are both attached and such that e.is_equal (f) holds. It does not say anything about type conformance. I guess the standard needs to be updated, but would like to keep this bug report until this is fixed.
I thought that = was ~ for expanded types, thus it cannot compare different types.