Bug 53202 - Number minus Enum gives wrong value
Summary: Number minus Enum gives wrong value
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 4.0.0
Hardware: PC All
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2017-03-09 18:08 UTC by Denis Zykov
Modified: 2017-06-01 14:36 UTC (History)
1 user (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Denis Zykov 2017-03-09 18:08:03 UTC
Following code:

csharp> (int)ConsoleColor.DarkCyan
3
csharp> 5 - ConsoleColor.DarkCyan
-2

in .NET gives 2, which is correct result.

Number plus Enum, Enum plus Number, Enum minus Number are fine.
Comment 1 Marek Safar 2017-06-01 14:36:42 UTC
Fixed in master and 2017-04 branch

Note You need to log in before you can comment on or make changes to this bug.