Skip to content

Commit

Permalink
Fix display of generic type parameters of local functions in tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
siegfriedpammer committed Jul 26, 2020
1 parent 67b2a45 commit 33bc9fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public int MixedLocalFunction<T2>() where T2 : ICloneable, IConvertible
#if CS90
[My]
[return: My]
int NonStaticMethod6<T3>([My] int unused)
int NonStaticMethod6<[My] T3>([My] int unused)
#else
int NonStaticMethod6<T3>(int unused)
#endif
Expand Down
4 changes: 2 additions & 2 deletions ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpAmbience.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void ConvertSymbol(ISymbol symbol, TokenWriter writer, CSharpFormattingOp

if (symbol is ITypeDefinition)
WriteTypeDeclarationName((ITypeDefinition)symbol, writer, formattingPolicy);
else if (symbol is IMember && !(symbol is LocalFunctionMethod))
else if (symbol is IMember)
WriteMemberDeclarationName((IMember)symbol, writer, formattingPolicy);
else
writer.WriteIdentifier(Identifier.Create(symbol.Name));
Expand Down Expand Up @@ -223,7 +223,7 @@ void WriteMemberDeclarationName(IMember member, TokenWriter writer, CSharpFormat
{
TypeSystemAstBuilder astBuilder = CreateAstBuilder();
EntityDeclaration node = astBuilder.ConvertEntity(member);
if ((ConversionFlags & ConversionFlags.ShowDeclaringType) == ConversionFlags.ShowDeclaringType && member.DeclaringType != null) {
if ((ConversionFlags & ConversionFlags.ShowDeclaringType) == ConversionFlags.ShowDeclaringType && member.DeclaringType != null && !(member is LocalFunctionMethod)) {
ConvertType(member.DeclaringType, writer, formattingPolicy);
writer.WriteToken(Roles.Dot, ".");
}
Expand Down

0 comments on commit 33bc9fb

Please sign in to comment.