Indexed Recursive Default Member Access

Identifies the use of indexed default member accesses that require a recursive default member resolution.

Reasoning

An indexed default member access hides away the actually called member. This is especially problematic if the corresponding parameterized default member is not on the interface of the object itself.

Default severity

Warning

Inspection type

CodeQualityIssues

Examples

This example should trigger a result

MyModule (StandardModule)
Public Sub DoSomething(ByVal rst As ADODB.Recordset) Dim bar As Variant bar = rst("MyField") End Sub

This example should NOT trigger a result

MyModule (StandardModule)
Public Sub DoSomething(ByVal rst As ADODB.Recordset) Dim bar As Variant bar = rst.Fields.Item("MyField") End Sub

Rubberduck.CodeAnalysis.Inspections.Concrete.IndexedRecursiveDefaultMemberAccessInspection.cs (Prerelease-v2.5.9.6289)