[Mono-bugs] [Bug 561369] New: Bug in Binary Operator Numeric Promotion (Code Provided)
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Dec 7 11:12:04 EST 2009
http://bugzilla.novell.com/show_bug.cgi?id=561369
http://bugzilla.novell.com/show_bug.cgi?id=561369#c0
Summary: Bug in Binary Operator Numeric Promotion (Code
Provided)
Classification: Mono
Product: Mono: Compilers
Version: SVN
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: gtg663g at mail.gatech.edu
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.25 Safari/532.5
Between lines 2572-2577 in "expression.cs" of gmcs (SVN trunk as of
2009-12-07), in the "DoNumericPromotion" method, the following compile-time
check appears:
//
// A compile-time error occurs if the other operand is of type sbyte, short,
int, or long
//
if (type == TypeManager.int32_type || type == TypeManager.int64_type ||
type == TypeManager.sbyte_type || type == TypeManager.sbyte_type)
return false;
Here, the operand type is checked against 'sbyte' twice, where it should be
checking against 'short' and 'sbyte'. I assume this is a typo based on the
comment and language spec, but if a change was made to mirror a bug in the
Microsoft compiler, it should probably be commented.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list