I'm listing a number of scenarios that are broken in similar ways. Hopefully they can be fixed with a single stone. If not, feel free to split this issue as necessary.
- ExplicitType
var x = (nint)0; produces IntPtr instead of nint.
- Same for IntroduceLocal, GenerateImplementation (implementing an interface), GenerateOverride (typing
override and using completion).
- Same ExtractMethod, ExtractLocalFunction, AddParameter. Those also generate
IntPtr parameters.
- Haven't tested MetadataAsSource, but it is likely the same.
Relates to #38821