Priority
Minor
Type
Bug 
State
Fixed 
Assignee
Olga Lobacheva 
Subsystem
No subsystem 
Affected versions
Fixed in
Fixed in build
Next build 
Build
567
Fixed in build
918
  • Submitted by   Evgeny Potashnik
    2 years ago (12 Dec 2007 04:15)
  • Updated by Evgeny Potashnik
    18 months ago (04 Aug 2008 20:04)
  • Jira: RSRP-54405
    (history, comments)

RSRP-54405

False positive: "Overflow in constant value computation"

0
Define an enum derived from byte, eg.

[Flags]
enum MyEnum : byte
{
One = 1,
Two = 2
}

To clear a flag you can write code like this:

MyEnum someVal &= ~MyEnum.One;

The C# compiler has no problems with this and it seems to work OK, however R# reports the "~MyEnum.One" code as an error: "Overflow in constant value computation"

Issue was closed
Comments (0)
 
History (0)
 
Links
 
Issue has no comments