Skip to content

'Add Overloads' Quick-Fix for BC40003 produces invalid code #21948

@AnthonyDGreen

Description

@AnthonyDGreen

Version Used: VS2017 RTM

Steps to Reproduce:

  1. Drop this in a new console app.
Class Base
    Sub M()

    End Sub
End Class

Class Derived
    Inherits Base

    Sub M() ' <--- Invoke the light bulb on this line.

    End Sub
End Class
  1. Invoke the light bulb on the indicated line.

Expected Behavior:
Modifier is either added on same line as Sub keyword.

Actual Behavior:
Modifier is added to a new line before the Sub keyword, which produces parse errors:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEBugLanguage-VBhelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on it

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions