PR# 18560 found bug in EQUALITY_TUPLE

Problem Report Summary
Submitter: clangford
Category: EiffelStudio
Priority: Medium
Date: 2013/03/27
Class: Bug
Severity: Serious
Number: 18560
Release: 7.2
Confidential: No
Status: Closed
Responsible:
Environment: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/536.28.10 (KHTML, like Gecko) Version/6.0.3 Safari/536.28.10
Synopsis: found bug in EQUALITY_TUPLE

Description
just noticed a problem in the is_equal feature:


	is_equal (other: like Current): BOOLEAN
			-- Does table contain the same information as `other'?
		local
			l_item, l_other: detachable ANY
			l_count, i: INTEGER
		do
			l_count := item.count
			Result := l_count = other.item.count
			if Result then
				from i := 1 until i > l_count loop
					l_item := item.item (i)
					l_other := other.item [i]
					Result := equal (l_item, l_other)
					i := i + 1
				end
			end
		end

you can see that Result just has the value of the last call to equal



To Reproduce
the following shows the error:

		some_feature
		local
			l_tuple: TUPLE
			l_e: EQUALITY_TUPLE[TUPLE]
		do
			l_tuple := [1,2]
			create l_e.make ([2,2])
			if l_e.is_equal (l_tuple) then
				print ("I think I'm equal")
			end
		end
Problem Report Interactions
From:manus_eiffel    Date:2013/03/27    Status: Closed    Download   
Thanks for the report. This is fixed in rev#92365.