Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit ff7b95d

Browse files
fix #337: Code inspection: "convert to constant"
1 parent 3d52796 commit ff7b95d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/PracticesAndImprovements

src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/PracticesAndImprovements/ConvertToConstantIssue.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public override void VisitVariableDeclarationStatement (VariableDeclarationState
180180
return;
181181

182182
var returnTypeRR = ctx.Resolve(varDecl.Type);
183-
if (returnTypeRR.Type.IsReferenceType.HasValue && returnTypeRR.Type.IsReferenceType.Value)
183+
if (!IsValidConstType(returnTypeRR.Type))
184184
return;
185185

186186
var variable = varDecl.Variables.First();

0 commit comments

Comments
 (0)