Bug Report T435618
Visible to All Users

Organize Members - Fields initialized by lambda expressions are not sorted

created 8 years ago

Organizing members is not working as expected. If you use Lambda expressions, they are simply thrown at the end of class without any reordering.

How it is now:

Visual Basic
Class C Dim _A As Integer Function F() End Function Sub S() End Sub Public Z = Function() End Function Public A = Function() End Function End Class

How it should be:

Visual Basic
Class C Dim _A As Integer Public A = Function()              End Function Public Z = Function()              End Function Function F() End Function Sub S() End Sub End Class
Comments (1)
DevExpress Support Team 8 years ago

    Thank you for pointing out this issue and providing the code sample. The Organize Members feature excludes some initialized fields from sorting because it can change logic of instance parent type initialization. We agree that this check is redundant when a field is initialized by a lambda expression and it should be sorted by name. We will correct the current behavior and inform you of our progress.

    Answers approved by DevExpress Support

    created 8 years ago (modified 8 years ago)

    We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

    Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

      Comments (2)
      OL OL
      Ondřej Linhart 8 years ago

        It works as it should in 16.1.7.16285. Good job.

        DevExpress Support Team 8 years ago

          You are welcome!

          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.