diff --git a/Speckle.InterfaceGenerator.Tests/SameName/SameNameClass.1.cs b/Speckle.InterfaceGenerator.Tests/SameName/SameNameClass.1.cs index 2a751d8..9c855f5 100644 --- a/Speckle.InterfaceGenerator.Tests/SameName/SameNameClass.1.cs +++ b/Speckle.InterfaceGenerator.Tests/SameName/SameNameClass.1.cs @@ -18,5 +18,6 @@ public class SameNameClass2 : ISameNameClass2 { public ISameNameClass Return() => throw new InvalidOperationException(); public SymbolToken Return2() => throw new InvalidOperationException(); + public T GetRequiredService() where T : class => throw new InvalidOperationException(); } diff --git a/Speckle.InterfaceGenerator/Speckle.InterfaceGenerator.csproj b/Speckle.InterfaceGenerator/Speckle.InterfaceGenerator.csproj index d49b068..0542471 100644 --- a/Speckle.InterfaceGenerator/Speckle.InterfaceGenerator.csproj +++ b/Speckle.InterfaceGenerator/Speckle.InterfaceGenerator.csproj @@ -3,7 +3,7 @@ netstandard2.0 Latest enable - 0.9.6 + 0.9.7 true false false diff --git a/Speckle.InterfaceGenerator/SymbolExtensions.cs b/Speckle.InterfaceGenerator/SymbolExtensions.cs index 5518ff8..889d8bd 100644 --- a/Speckle.InterfaceGenerator/SymbolExtensions.cs +++ b/Speckle.InterfaceGenerator/SymbolExtensions.cs @@ -10,6 +10,10 @@ internal static class SymbolExtensions private static readonly HashSet _defaults = new() { "System", "Microsoft" }; public static string GetNamespaceAndType(this ITypeSymbol typeSymbol) { + if (typeSymbol is ITypeParameterSymbol t) + { + return t.Name; + } if (typeSymbol.SpecialType != SpecialType.None) { return typeSymbol.ToString();