Description
Rubberduck version information
Version 2.5.9.6296
OS: Microsoft Windows NT 10.0.19045.0, x64
Host Product: Microsoft Office 2016 x64
Host Version: 16.0.5317.1000
Host Executable: MSACCESS.EXE
Description
Rubberduck parsing error when attempting to wrap a COM object property that is a VBA reserved word.
To Reproduce
Require a COM object with a property name that would conflict with a VBA reserved word.
For the example the COM object MatchSingleton has a property named Empty as displayed screenshot.
When attempting to wrap the MatchSingleton.Empty property, displayed below and selecting the RD parse icon it produces a 'Parse Error'. Commenting out the Set EmptyMatch = this.MatchSingleton.Empty() there is no parse error.
Notes:
Renamed the wrapper property to EmptyMatch as Empty is VBA reserved word.
Code compiles.
To avoid the Rubberduck 'Parse Error' issue I've renamed the COM object property MatchSingleton.Empty property to MatchSingleton.EmptyMatch and parses ok. i.e. Set EmptyMatch = this.MatchSingleton.EmptyMatch()
'@Description("Gets the empty group. All failed matches return this empty match.")
Public Property Get EmptyMatch() As DotNetLib.Match
Set EmptyMatch = this.MatchSingleton.Empty()
End Property
Expected behavior
No parsing error.
Activity