File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed
RubberduckTests/Inspections Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ public void MemberNotOnInterface_WithNewReturnsResult()
252252 const string inputCode =
253253 @"Sub Foo()
254254 With New Dictionary
255- Debug.Print .FooBar
255+ .FooBar
256256 End With
257257End Sub" ;
258258
@@ -265,6 +265,31 @@ End With
265265 }
266266 }
267267
268+ //See https://github.com/rubberduck-vba/Rubberduck/issues/4308
269+ [ Test ]
270+ [ Category ( "Inspections" ) ]
271+ [ Ignore ( "To be unignored in a PR fixing issue 4308." ) ]
272+ public void MemberNotOnInterface_ProcedureArgument ( )
273+ {
274+ const string inputCode =
275+ @"Sub Foo()
276+ Dim fooBaz As Dictionary
277+ Set fooBaz = New Dictionary
278+ Bar fooBaz.FooBar
279+ End Sub
280+
281+ Private Sub Bar(baz As Long)
282+ End Sub" ;
283+
284+ using ( var state = ArrangeParserAndParse ( inputCode ) )
285+ {
286+ var inspection = new MemberNotOnInterfaceInspection ( state ) ;
287+ var inspectionResults = inspection . GetInspectionResults ( CancellationToken . None ) ;
288+
289+ Assert . AreEqual ( 1 , inspectionResults . Count ( ) ) ;
290+ }
291+ }
292+
268293 [ Test ]
269294 [ Category ( "Inspections" ) ]
270295 public void MemberNotOnInterface_DoesNotReturnResult_WithNewBlockBangNotation ( )
You can’t perform that action at this time.
0 commit comments