Inspectopedia
 
2024.3

Local variable with type parameters

Error
New
Last modified: 03 December 2024

Reports local variables with type parameters.

A type parameter for a local variable doesn't make sense because it can't be specialized.

Example:

After the quick-fix is applied:

This inspection only reports if the Kotlin language level of the project or module is 1.4 or higher.