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 = Nothing
Gets converted to:
Const test As ArgumentException = Nothing
This 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.
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.