Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-288182: Wrong quick-fix for int/enum type conversion error in C#

$
0
0
Reporter Geoff Hart (gghart) Geoff Hart (gghart)
Created Feb 6, 2012 9:01:23 PM
Updated Feb 6, 2012 9:01:23 PM
Priority Normal
Type Bug
Fix versions No Fix versions
State Submitted
Assignee Unassigned
Subsystem No subsystem
Affected versions 6.1
Fixed in build No Fixed in build
The code analysis shows the right error, but the quick-correct action is to change it to a return statement instead of add a type conversion:

namespace RlLogAnalyzer
{
    internal class Test
    {
        private int _state;

        private enum testEnum
        {
            A = 1,
            B = 2
        }

        private int testValue
        {
            get
            {
                int value = 0;

                if (_state == 0)
                    value += testEnum.B;

                return value;
            }
        }
    }
}


Viewing all articles
Browse latest Browse all 106942

Trending Articles