diff --git a/src/Bicep.Core/Syntax/VariableDeclarationSyntax.cs b/src/Bicep.Core/Syntax/VariableDeclarationSyntax.cs index 75446821ef1..d9d5418041d 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,