We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d4431c commit 14ad4d9Copy full SHA for 14ad4d9
Rubberduck.Parsing/Symbols/DeclarationSymbolsListener.cs
@@ -185,6 +185,16 @@ private Declaration CreateDeclaration(
185
{
186
var argContext = (VBAParser.ArgContext)context;
187
var isOptional = argContext.OPTIONAL() != null;
188
+ if (isOptional)
189
+ {
190
+ // if parameter is optional, asTypeName may contain the default value
191
+ var complexType = asTypeContext.type().complexType();
192
+ if (complexType != null && complexType.expression() is VBAParser.RelationalOpContext)
193
194
+ asTypeName = complexType.expression().GetChild(0).GetText();
195
+ }
196
197
+
198
var isByRef = argContext.BYREF() != null;
199
var isParamArray = argContext.PARAMARRAY() != null;
200
result = new ParameterDeclaration(
0 commit comments