File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
RetailCoder.VBE/Inspections Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -75,10 +75,9 @@ public override IEnumerable<InspectionResultBase> GetInspectionResults()
75
75
( item . DeclarationType == DeclarationType . Function || item . DeclarationType == DeclarationType . PropertyGet )
76
76
&& ! item . IsArray
77
77
&& item . IsTypeSpecified
78
- && ! ValueTypes . Contains ( item . AsTypeName )
79
- && ( item . AsTypeDeclaration != null && (
80
- item . AsTypeDeclaration . DeclarationType != DeclarationType . Enumeration
81
- && item . AsTypeDeclaration . DeclarationType != DeclarationType . UserDefinedType ) ) ) ;
78
+ && ! ValueTypes . Contains ( item . AsTypeName )
79
+ && ( item . AsTypeDeclaration == null // null if unresolved (e.g. in unit tests)
80
+ || ( item . AsTypeDeclaration . DeclarationType != DeclarationType . Enumeration && item . AsTypeDeclaration . DeclarationType != DeclarationType . UserDefinedType ) ) ) ;
82
81
83
82
var interestingReferences = interestingDeclarations
84
83
. Union ( interestingMembers . SelectMany ( item =>
You can’t perform that action at this time.
0 commit comments