Skip to content

Commit

Permalink
Fixed INamedTypeSymbolExtensions.FullName for delegates.
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkDaskin authored and JohanLarsson committed May 18, 2024
1 parent dde64ae commit 9d5959c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class INamedTypeSymbolExtensionsTests
[TestCase(typeof(List<>))]
[TestCase(typeof(Dictionary<,>))]
[TestCase(typeof(Nested))]
[TestCase(typeof(Action))]
[TestCase(typeof(Action<>))]
public static void FullName(Type type)
{
var syntaxTree = CSharpSyntaxTree.ParseText(
Expand Down Expand Up @@ -48,6 +50,7 @@ public class C
[TestCase(typeof(IEnumerable<IEnumerable<Nested>>))]
[TestCase(typeof(List<int>))]
[TestCase(typeof(Dictionary<int, string>))]
[TestCase(typeof(Action<int>))]
public void FullNameWithTypeArgs(Type type)
{
var syntaxTree = CSharpSyntaxTree.ParseText(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public static string FullName(this INamedTypeSymbol type)
case SymbolDisplayPartKind.ClassName:
case SymbolDisplayPartKind.InterfaceName:
case SymbolDisplayPartKind.StructName:
case SymbolDisplayPartKind.DelegateName:
case SymbolDisplayPartKind.NamespaceName:
if (part.Symbol is { } symbol)
{
Expand Down

0 comments on commit 9d5959c

Please sign in to comment.