Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upBUG: CC0030 (MakeLocalVariableConst) - False positive on reference types initialized to Nothing (VB) #960
Comments
|
Bug confirmed. |
CC0030 (MakeLocalVariableConst) reported when it isn't applicable on reference types initialized to Nothing. Using the latest VB extension.
To recreate:
Dim test As ArgumentException = NothingGets converted to:
Const test As ArgumentException = NothingThis results in error BC30424 "Constants must be of an intrinsic or enumerated type, not a class, structure, type parameter, or array type.".
Expecting no diagnostic when a reference type is initialized to Nothing.