Skip to content

IlSpy mistakenly assumes some out variables are already in scope #3569

@nikitalita

Description

@nikitalita

When decompiling a statement that contains an out variable, ILSpy will check to see if that particular named variable is in already scope before determining whether or not to also make it a declaration. However, it sometimes incorrectly determines that some out vars are already in scope when they actually aren't, such as the following example:

Image

This tends to only crop up if we're using a pdb containing the debug names of the variables (we would otherwise just choose unique names for each out variable)

Details

  • Product in use: ILSpyCmd
  • Version in use: current main

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions