File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
RetailCoder.VBE/Inspections
RubberduckTests/Inspections Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,11 @@ public override IEnumerable<InspectionResultBase> GetInspectionResults()
24
24
var interfaceMembers = UserDeclarations . FindInterfaceImplementationMembers ( ) ;
25
25
26
26
var issues = ( from item in UserDeclarations
27
- where ! item . IsInspectionDisabled ( AnnotationName )
27
+ where
28
+ ! item . IsInspectionDisabled ( AnnotationName )
28
29
&& item . DeclarationType == DeclarationType . Parameter
30
+ // ParamArray parameters do not allow an explicit "ByRef" parameter mechanism.
31
+ && ! ( ( ParameterDeclaration ) item ) . IsParamArray
29
32
&& ! interfaceMembers . Select ( m => m . Scope ) . Contains ( item . ParentScope )
30
33
let arg = item . Context as VBAParser . ArgContext
31
34
where arg != null && arg . BYREF ( ) == null && arg . BYVAL ( ) == null
Original file line number Diff line number Diff line change 423
423
<value >Deklariere explizit als 'Variant'</value >
424
424
</data >
425
425
<data name =" ImplicitByRefParameterQuickFix" xml : space =" preserve" >
426
- <value >Über gebe den Parameter explizit als Referenz</value >
426
+ <value >Parameter explizit als Referenz angeben </value >
427
427
</data >
428
428
<data name =" Inspections_DeclarationOf" xml : space =" preserve" >
429
429
<value >Deklaration von</value >
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ public void ImplicitByRefParameter_QuickFixWorks_PassByRef()
200
200
}
201
201
202
202
[ TestMethod ]
203
- public void ImplicitByRefParameter_QuickFixWorks_ParamArrayMustBePassedByRef ( )
203
+ public void ImplicitByRefParameter_QuickFixWorks_ParamArrayIsIgnored ( )
204
204
{
205
205
const string inputCode =
206
206
@"Sub Foo(ParamArray arg1 As Integer)
@@ -220,7 +220,7 @@ public void ImplicitByRefParameter_QuickFixWorks_ParamArrayMustBePassedByRef()
220
220
var inspection = new ImplicitByRefParameterInspection ( parser . State ) ;
221
221
var inspectionResults = inspection . GetInspectionResults ( ) ;
222
222
223
- Assert . AreEqual ( 2 , inspectionResults . First ( ) . QuickFixes . Count ( ) ) ;
223
+ Assert . AreEqual ( 0 , inspectionResults . Count ( ) ) ;
224
224
}
225
225
226
226
[ TestMethod ]
You can’t perform that action at this time.
0 commit comments