Skip to content

SCP adds extra parentheses after function name when there's a trailing space #5022

Open
@daFreeMan

Description

@daFreeMan

Rubberduck version information

Version 2.4.1.4734
OS: Microsoft Windows NT 10.0.15063.0, x64
Host Product: Microsoft Office 2016 x64
Host Version: 16.0.4849.1000
Host Executable: EXCEL.EXE

Description
A space after a Function name and before the opening paren causes fun results.

To Reproduce
Steps to reproduce the behavior:

  1. Begin a new function declaration: Private Function foo | (note the space after foo)
  2. Type (
  3. End up with Private Function foo() ()
  4. See error

Expected behavior
There should not be 2 sets of parens inserted by SCP.
This appears to be a fun edge case caused by a trailing space after the function name.

Screenshots
These screenshots show what happens as I Ctrl-Z to undo the changes made by SCP, in case that's useful.
2019-06-26 09_54_59-Microsoft Visual Basic for Applications - Satisfaction Summary Master v3 34 - De
2019-06-26 09_55_12-Microsoft Visual Basic for Applications - Satisfaction Summary Master v3 34 - De
2019-06-26 09_55_29-Microsoft Visual Basic for Applications - Satisfaction Summary Master v3 34 - De

Logfile
RubberduckLog.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIdentifies work items for known bugsedge-caseMarks a bug as an edge case that would be nice to fix, but that likely doesn't affect normal use.feature-autocomplete

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions