Closed KirillOsenkov closed 1 year ago
Here's a PR that adds a unit-test: https://github.com/benaadams/Ben.Demystifier/pull/110
It is significant that the method parameter type is a nested type of a generic type where the generic type parameter is a value tuple with named parameters.
Basically the logic for value tuples needs to be aware of nested types of generic types that themselves don't have a backtick in the name: https://github.com/benaadams/Ben.Demystifier/blob/0f17b3029b842b0886ce49cafc3032184805873e/src/Ben.Demystifier/ValueTupleResolvedParameter.cs#L23-L26
Released a new version that doesn't have this issue; though not sure it makes it a sensible type name, looking into that
The exception is here: https://github.com/benaadams/Ben.Demystifier/blob/0f17b3029b842b0886ce49cafc3032184805873e/src/Ben.Demystifier/TypeNameHelper.cs#L65
The type in question is:
Roslyn.Utilities.MultiDictionary
2+ValueSet[Microsoft.CodeAnalysis.Document,System.ValueTuple2[Microsoft.CodeAnalysis.ISymbol,Microsoft.CodeAnalysis.FindSymbols.Finders.IReferenceFinder]]
http://sourceroslyn.io/#Microsoft.CodeAnalysis/InternalUtilities/MultiDictionary.cs,b9e522a001545166
Even though the type is a generic type, the name is just
ValueSet
and doesn't contains the backtick.