Open
Description
Version 2.5.2.x (debug)
OS: Microsoft Windows NT 10.0.19044.0, x64
Host Product: Microsoft Office x64
Host Version: 16.0.15028.20228
Host Executable: EXCEL.EXE
Description
RD does not flag unused or unassigned User Defined Type members.
To Reproduce
The following code generates 'VariableNotUsed' and 'VariableNotAssigned' inspection results for mNotUsed
, but no flagged results for the SecondVal
UDT Member.
Option Explicit
Private Type TMCVE
FirstVal As Long
SecondVal As Double
End Type
Private this As TMCVE
Private mUsed As Long
Private mNotUsed As Double
Private Sub Class_Initialize()
mUsed = 1
this.FirstVal = 1
End Sub
Private Function Sum() As Long
Sum = mUsed + this.FirstVal
End Function
Expected behavior
In the above example, RD should flag SecondVal
as UDTMemberNotUsed
and UDTMemberNotAssigned
(if implemented as a dedicated inspection) or flag SecondVal
as part of the VariableNotUsed/Assigned
inspection result sets.