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

Type/member usage missing from analysis #3134

Closed
carlreinke opened this issue Dec 3, 2023 · 2 comments
Closed

Type/member usage missing from analysis #3134

carlreinke opened this issue Dec 3, 2023 · 2 comments
Labels

Comments

@carlreinke
Copy link

Steps to reproduce

  1. Decompile Microsoft.AspNetCore.Routing.RouteEndpointDataSource.AddRequestDelegate(...) in "Microsoft.AspNetCore.Routing, Version=8.0.0.0".
  2. In the code pane, right-click RouteEntry; click "Analyze".
  3. In the "Analyze" pane, expand "Instantiated By". The list is missing the method we just decompiled.
  4. In the code pane, right-click the property HttpMethods in the RouteEntry initializer; click "Analyze".
  5. In the "Analyze" pane, expand "set" and then "Used By". The list is missing the method we just decompiled.

Details

  • Product in use: ILSpy
  • Version in use: 8.2.0.7535
@carlreinke carlreinke added the Bug label Dec 3, 2023
@siegfriedpammer
Copy link
Member

Thanks for your report!

Regarding RouteEntry: The cause for this is that it is a struct and the "Instantiated By" analyzer only scans for newobj instructions, but not initobj. Not sure, if treating initobj the same would be an appropriate fix.
Regarding HttpsMethods: Yes, that should actually work. Will provide a fix.

@carlreinke
Copy link
Author

carlreinke commented Dec 4, 2023

Ideally, I'd want "Instantiated By" to include any place the decompiler would output new X. But I guess initobj represents default(X) as well as new X() for value types? I think there's an argument to be made that default for value types does represent an instantiation.

siegfriedpammer added a commit that referenced this issue Dec 12, 2023
…from the enclosing type to public members of private nested types to be found.
mattsh247 pushed a commit to mattsh247/ILSpy that referenced this issue Jul 30, 2024
…references from the enclosing type to public members of private nested types to be found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants