Skip to content

False positive `Variable '{x}' is not used' #5291

@daFreeMan

Description

@daFreeMan

Rubberduck version information
The info below can be copy-paste-completed from the first lines of Rubberduck's log or the About box:

Version 2.4.1.5196
OS: Microsoft Windows NT 10.0.17134.0, x64
Host Product: Microsoft Office 2016 x64
Host Version: 16.0.4873.1000
Host Executable: MSACCESS.EXE

Description
I received a Variable 'this' is not used inspection on an interface. Variables shouldn't be used in interfaces.

To Reproduce
Steps to reproduce the behavior:

  1. enter code:
'@Interface
Option Explicit

Private Type foo
  bar as string
  baz as string
End Type
Private this as foo
  1. parse & run inspections
  2. Profit!!! er... see inspection result

Expected behavior
No Variable not used inspections should appear on Interface modules

Screenshots
N/A

Logfile
RubberduckLog.txt

Additional context

Metadata

Metadata

Assignees

Labels

bugIdentifies work items for known bugsfeature-inspectionsinspection-false-positiveA bug where an inspection result appears, even though it is incorrect.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions