Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge case: ILSpy report invaild visibility if overrided properties have different visibility than base #2653

Closed
yyjdelete opened this issue Mar 17, 2022 · 0 comments
Labels
Bug Decompiler The decompiler engine itself

Comments

@yyjdelete
Copy link
Contributor

Input code

A.dll

    public class Class1
    {
        protected internal virtual int A => 1;
    }

B.dll(reference A)

    public class Class2 : Class1
    {
        protected override int A => 2;
    }

Erroneous output

It's strange it can work well if ILSpy can't found A.dll, but with A.dll it get the below code(use the visibility of base prop for prop and the visibility of owned getter for getter)

	protected internal override int A
	{
		protected get
		{
			return 2;
		}
	}

Details

  • Product in use: ILSpy
  • Version in use: 7.2.0.6844/8.0.0.6922-alpha1
@yyjdelete yyjdelete added Bug Decompiler The decompiler engine itself labels Mar 17, 2022
@yyjdelete yyjdelete changed the title Edge case: ILSpy report invaild visibility for overrided properities Edge case: ILSpy report invaild visibility if overrided properties have different visibility than base Mar 17, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Decompiler The decompiler engine itself
Projects
None yet
Development

No branches or pull requests

1 participant