From 56d041cad5ad6f27a87f9a2c528f6447dd63dd27 Mon Sep 17 00:00:00 2001 From: Jonathan Eskew Date: Fri, 15 Nov 2024 16:27:27 -0500 Subject: [PATCH] Mark an accidentally public method as `private static` --- src/Bicep.Core/Syntax/VariableDeclarationSyntax.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bicep.Core/Syntax/VariableDeclarationSyntax.cs b/src/Bicep.Core/Syntax/VariableDeclarationSyntax.cs index 75446821ef1..4b37a2c3ce8 100644 --- a/src/Bicep.Core/Syntax/VariableDeclarationSyntax.cs +++ b/src/Bicep.Core/Syntax/VariableDeclarationSyntax.cs @@ -31,7 +31,7 @@ public VariableDeclarationSyntax(IEnumerable 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, @@ -40,7 +40,7 @@ public VariableDeclarationSyntax(IEnumerable 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);