PR# 18264 Wrong flat form for call with implicit argument conversion
Problem Report Summary
Submitter: prestoat2000
Category: Compiler
Priority: Medium
Date: 2012/07/20
Class: Bug
Severity: Serious
Number: 18264
Release: 7.1.88986
Confidential: No
Status: Analyzed
Responsible: ted_eiffel
Environment: Mozilla/5.0 (X11; SunOS sun4u; rv:13.0) Gecko/20100101 Firefox/13.0
Solaris 10 on x86
Synopsis: Wrong flat form for call with implicit argument conversion
Description
A call to a routine try (10000 * 1000000) with try (n: INTEGER_64) is shown in the Flat form as make do try (10000 * 1000000.to_integer_64) end This is wrong, because "." has higher precedence than "*", so the Flat form makes it look like 1000000 will be converted to INTEGER_64 and then multiplied by 10000 (which will first be converted to INTEGER_64). The correct Flat form, showing what will really happen when the code is executed, is make do try ((10000 * 1000000).to_integer_64) end I don't know if this is fixable but it is very misleading, since it makes it appear that the call will function as expected (but it won't).
To Reproduce
Compile with attached class TEST and examine Flat form of {TEST}.make.