Obsolete Type Hint

Flags declarations where a type hint is used in place of an 'As' clause.

Reasoning

Type hints were made obsolete when declaration syntax introduced the 'As' keyword. Prefer explicit type names over type hint symbols.

Default severity

Suggestion

Inspection type

LanguageOpportunities

Examples

This example should trigger a result

MyModule (StandardModule)
Public Sub DoSomething() Dim foo$ foo = "some string" End Sub

This example should NOT trigger a result

MyModule (StandardModule)
Public Sub DoSomething() Dim foo As String foo = "some string" End Sub

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