Skip to content

Commit

Permalink
Fix too strict Source Generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobris committed Jan 7, 2025
1 parent c0d1481 commit b7e10ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion BTDB.SourceGenerator/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)

if (syntaxContext.Node is InterfaceDeclarationSyntax)
{
if (symbol.AllInterfaces.SingleOrDefault(IsICovariantRelation) is { } relation)
if (symbol.AllInterfaces.FirstOrDefault(IsICovariantRelation) is { } relation)
{
var relationType = relation.TypeArguments[0].OriginalDefinition;
if (relationType is not INamedTypeSymbol)
Expand Down
12 changes: 2 additions & 10 deletions BTDBTest/ObjectDbTableRemoveOptimalizeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -526,17 +526,9 @@ public bool RollbackAdvised
return _keyValueDBTransaction.CalcBTreeStats();
}

public IKeyValueDBCursor? FirstCursor
{
get => _keyValueDBTransaction.FirstCursor;
set => _keyValueDBTransaction.FirstCursor = value;
}
public IKeyValueDBCursor? FirstCursor { get; set; }

public IKeyValueDBCursor? LastCursor
{
get => _keyValueDBTransaction.LastCursor;
set => _keyValueDBTransaction.LastCursor = value;
}
public IKeyValueDBCursor? LastCursor { get; set; }

public bool IsWriting()
{
Expand Down

0 comments on commit b7e10ef

Please sign in to comment.