Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/UnitGenerator/SourceGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ bool IsImplementedGenericSelfType(INamedTypeSymbol interfaceSymbol)

class SyntaxReceiver : ISyntaxReceiver
{
public List<(StructDeclarationSyntax type, AttributeSyntax attr, PredefinedTypeSyntax? targetType)> Targets { get; } = new();
public List<(StructDeclarationSyntax type, AttributeSyntax attr, TypeSyntax? targetType)> Targets { get; } = new();

public void OnVisitSyntaxNode(SyntaxNode syntaxNode)
{
Expand All @@ -1372,7 +1372,7 @@ from attribute in attributesList.Attributes
SimpleNameSyntax name => name.Identifier.Text,
_ => attribute.Name.ToString(),
}
let targetType = attribute.Name is GenericNameSyntax gName ? gName.TypeArgumentList.ChildNodes().FirstOrDefault() as PredefinedTypeSyntax : null
let targetType = attribute.Name is GenericNameSyntax gName ? gName.TypeArgumentList.ChildNodes().FirstOrDefault() as TypeSyntax : null
where attributeName is "UnitOf" or "UnitOfAttribute"
select new { attribute, targetType }).FirstOrDefault();

Expand Down