Stripped info on parent types in source generator

このコミットが含まれているのは:
Sergio Pedri committed 2020-11-25 01:16:24 +01:00
1 親 28f70fe0cb
コミット b31ec9f959
2ファイル変更
+11 -2

検索条件に一致するファイルはありません

+5 -1
ファイルの表示
@@ -87,7 +87,11 @@ namespace ComputeSharp.SourceGenerators
// Add all parent types in ascending order, if any
foreach (var parentType in structDeclaration.Ancestors().OfType<TypeDeclarationSyntax>())
{
typeDeclarationSyntax = parentType.WithMembers(SingletonList<MemberDeclarationSyntax>(typeDeclarationSyntax));
typeDeclarationSyntax = parentType
.WithMembers(SingletonList<MemberDeclarationSyntax>(typeDeclarationSyntax))
.WithConstraintClauses(List<TypeParameterConstraintClauseSyntax>())
.WithBaseList(null)
.WithoutTrivia();
}
// Create the compilation unit with the namespace and target member.
+6 -1
ファイルの表示
@@ -25,11 +25,16 @@ namespace ComputeSharp.Tests.Internals
public class Buffer<T>
{
}
public interface IFluff
{
}
}
namespace MyFancyApp.Sample
{
public partial interface IFoo<T>
public partial interface IFoo<T> : IFluff
where T : notnull, new()
{
public partial class Foo
{