From 1041373a5d4a5159ee505a2724e82c1ccaf15451 Mon Sep 17 00:00:00 2001 From: Owen Smith Date: Fri, 15 May 2026 11:09:44 -0400 Subject: [PATCH] fix ConstantAttributeAnalyzer null reference --- .../ApiUsage/ConstantAttributeAnalyzer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/D2L.CodeStyle.Analyzers/ApiUsage/ConstantAttributeAnalyzer.cs b/src/D2L.CodeStyle.Analyzers/ApiUsage/ConstantAttributeAnalyzer.cs index a47a9de6..79490eae 100644 --- a/src/D2L.CodeStyle.Analyzers/ApiUsage/ConstantAttributeAnalyzer.cs +++ b/src/D2L.CodeStyle.Analyzers/ApiUsage/ConstantAttributeAnalyzer.cs @@ -133,7 +133,7 @@ ISymbol constantAttribute } // Argument was defined as [Constant] already, so trust it - var argumentSymbol = argument.SemanticModel.GetSymbolInfo( (argument.Syntax as ArgumentSyntax).Expression, context.CancellationToken ).Symbol; + var argumentSymbol = argument.SemanticModel.GetSymbolInfo( argument.Value.Syntax, context.CancellationToken ).Symbol; if( argumentSymbol != null && HasAttribute( argumentSymbol, constantAttribute ) ) { return; }