Skip to content

Commit

Permalink
remove requirement for template to be partial
Browse files Browse the repository at this point in the history
  • Loading branch information
sicusa committed Apr 28, 2024
1 parent 16fa851 commit dd9bebd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Sia.CodeGenerators/SiaTemplateGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)

var codeGenInfos = context.SyntaxProvider.ForAttributeWithMetadataName(
SiaTemplateAttributeName,
static (syntaxNode, token) =>
((TypeDeclarationSyntax)syntaxNode).Modifiers.Any(SyntaxKind.PartialKeyword),
static (syntaxNode, token) => true,
static (syntax, token) =>
(syntax, ParentTypes: GetParentTypes(syntax.TargetNode)))
.Select(static (t, token) => {
Expand Down
2 changes: 1 addition & 1 deletion Sia.Tests/Components/TemplateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public abstract record Test
}

[SiaTemplate("TestObject")]
public partial record TestTemplate<T> : Test
public record TestTemplate<T> : Test
{
public T? Value { get; set; }

Expand Down

0 comments on commit dd9bebd

Please sign in to comment.