Bug Report T1173240
Visible to All Users

Simplify Expression refactoring breaks code

created 2 years ago

I have this code, where both variables are nullable strings:

C#
if (answer.ElectricalExists == true || answer.SharpsExist == true) return "B";

I'm being given a Simplify option to remove the "== true" parts, but that's not valid code at that point.

Comments (3)
PW PW
Przemyslaw Wlodarczak (DevExpress) 2 years ago

    Scott,

    We reproduced this issue and will fix it shortly.

      Still seeing this issue. Did the fix go out?

      PW PW
      Przemyslaw Wlodarczak (DevExpress) 2 years ago

        Scott,

        CodeRush 23.1.4 is not released yet.

        Answers approved by DevExpress Support

        created 2 years ago

        We have addressed the issue described in this ticket and will include a fix in our next maintenance update. Should you need to apply our fix prior to official release, you can request a hotfix here.

        Important Notes:

        • Hotfixes may be unavailable for Early Access/Beta builds or updates set for release within a week.
        • .NET only: in the NuGet Package Manager, use your personal NuGet feed and check the "Include prerelease" option to view the hotfix package in the "Updates" tab.
          Comments (3)
          PW PW
          Przemyslaw Wlodarczak (DevExpress) 2 years ago

            Hi,

            Do you mind if we make this ticket public so that we can include it in the "Resolved issues" for the next release?

              You can make it public.

              PW PW
              Przemyslaw Wlodarczak (DevExpress) 2 years ago

                Thank you.

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.