Inspectopedia Help

Redundant nullable type

Reports usages of ? where they can be omitted, for example, if the inferred type of assigned expression is not nullable.

Suggests removing redundant ? in type declarations.


let x: Int? = 42

After the quick-fix is applied:

let x: Int = 42

Inspection Details

Available in:

AppCode 2023.3


Swift Language Support, 233.SNAPSHOT

Last modified: 13 July 2023