Skip to content

Commit

Permalink
Mark an accidentally public method as private static
Browse files Browse the repository at this point in the history
  • Loading branch information
jeskew committed Nov 15, 2024
1 parent 2facf4f commit 56d041c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Bicep.Core/Syntax/VariableDeclarationSyntax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public VariableDeclarationSyntax(IEnumerable<SyntaxBase> leadingNodes, Token key

public SyntaxBase? TryGetBody() => UnwrapBody(Value);

public SyntaxBase? UnwrapBody(SyntaxBase body) => body switch
private static SyntaxBase? UnwrapBody(SyntaxBase body) => body switch
{
SkippedTriviaSyntax => null,
ForSyntax @for => @for.Body,
Expand All @@ -40,7 +40,7 @@ public VariableDeclarationSyntax(IEnumerable<SyntaxBase> leadingNodes, Token key
};

public SyntaxBase GetBody() => TryGetBody() ??
throw new InvalidOperationException($"A valid resource body is not available on this variable due to errors. Use {nameof(TryGetBody)}() instead.");
throw new InvalidOperationException($"A valid body is not available on this variable due to errors. Use {nameof(TryGetBody)}() instead.");

public override void Accept(ISyntaxVisitor visitor) => visitor.VisitVariableDeclarationSyntax(this);

Expand Down

0 comments on commit 56d041c

Please sign in to comment.