Skip to content

Commit 1d8510c

Browse files
authored
Merge pull request #2590 from comintern/next
Fix IsImplicitByRef flags for built-in parameters.
2 parents 69f200e + 78f8548 commit 1d8510c

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

Rubberduck.Parsing/Symbols/DeclarationLoaders/FormEventDeclarations.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ private static ParameterDeclaration UserFormQueryCloseEventCancelParameter(Decla
141141
null,
142142
string.Empty,
143143
false,
144+
true,
145+
false,
146+
false,
144147
true);
145148
}
146149

@@ -155,6 +158,9 @@ private static ParameterDeclaration UserFormQueryCloseEventCloseModeParameter(De
155158
null,
156159
string.Empty,
157160
false,
161+
true,
162+
false,
163+
false,
158164
true);
159165
}
160166

Rubberduck.Parsing/Symbols/ParameterDeclaration.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public ParameterDeclaration(QualifiedMemberName qualifiedName,
4040
{
4141
_isOptional = isOptional;
4242
_isByRef = isByRef;
43+
_isImplicitByRef = false;
4344
IsParamArray = isParamArray;
4445
}
4546

@@ -56,7 +57,8 @@ public ParameterDeclaration(QualifiedMemberName qualifiedName,
5657
bool isOptional,
5758
bool isByRef,
5859
bool isArray = false,
59-
bool isParamArray = false)
60+
bool isParamArray = false,
61+
bool isBuiltIn = false)
6062
: base(
6163
qualifiedName,
6264
parentDeclaration,
@@ -71,7 +73,7 @@ public ParameterDeclaration(QualifiedMemberName qualifiedName,
7173
selection,
7274
isArray,
7375
asTypeContext,
74-
false)
76+
isBuiltIn)
7577
{
7678
_isOptional = isOptional;
7779
_isByRef = isByRef;
@@ -88,12 +90,10 @@ public ParameterDeclaration(ComParameter parameter, Declaration parent, Qualifie
8890
null,
8991
parameter.IsOptional,
9092
parameter.IsByRef,
91-
parameter.IsArray)
92-
{
93-
IsParamArray = parameter.IsParamArray;
94-
}
95-
96-
93+
parameter.IsArray,
94+
parameter.IsParamArray)
95+
{ }
96+
9797
public bool IsOptional { get { return _isOptional; } }
9898
public bool IsByRef { get { return _isByRef; } }
9999
public bool IsImplicitByRef { get { return _isImplicitByRef; } }

0 commit comments

Comments
 (0)