Inspection Details

ImplicitVariantReturnType


Summary
Warns about 'Function' and 'Property Get' procedures that don't have an explicit return type.
Reasoning
All functions return something, whether a type is specified or not. The implicit default is 'Variant'.
The following code example(s) would trigger this inspection:

Public Function GetFoo()
    GetFoo = 42
End Function

The following code example(s) would not trigger this inspection:

Public Function GetFoo() As Long
    GetFoo = 42
End Function


Back to List