Skip to content

Visual Basic: "Object initialization can be simplified (IDE0017)" wrong indent with custom tab/indent size #66071

Closed

Description

@skurth

Version Used: Visual Studio 2022 (17.4.1, also with 17.4.3)

Steps to Reproduce:

Module Program

  Sub Main(args As String())
    Dim testObj As New Test()
    testObj.TestString = "harr"
    testObj.TestInt = 5
  End Sub

  Private Class Test
    Property TestString As String
    Property TestInt As Integer
  End Class

End Module

Tabs settings:
image

Expected Behavior:
The indent should be correct. In Visual Studio 2019, this worked:
image

Actual Behavior:
image

Activity

  1. ghost added
    untriaged
    on Dec 20, 2022
  2. Youssef1313 commented on Dec 20, 2022

    @Youssef1313
    Member

    @skurth Can you update to 17.4.3?

    I think this issue was fixed and backported to 17.4 (PR: #65382)

  3. skurth commented on Dec 20, 2022

    @skurth
    Author

    @Youssef1313 I have updated to 17.4.3 and still have this issue.

  4. skurth commented on Jan 11, 2023

    @skurth
    Author

    @Youssef1313 Still have this issue in 17.4.4

  5. added
    help wanted
    and removed
    untriaged
    on Jan 11, 2023
  6. added this to the Backlog milestone on Jan 11, 2023
  7. CyrusNajmabadi commented on Jan 11, 2023

    @CyrusNajmabadi
    Contributor

    @skurth Does this repro with 17.5 or 17.6?

  8. skurth commented on Feb 28, 2023

    @skurth
    Author

    @CyrusNajmabadi Works in 17.5 :) Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEBughelp wanted

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions