E4027#
Unused type parameter.
Erroneous Example#
fn id[T](a: Int) -> Int { a }
The example above declares a type parameter T
in the identity function id
,
however T
is not used anywhere in the function signature,
giving the following error on line 1:
Unused type parameter 'T'
Suggestion#
Make sure the type parameter is used in the function signature:
fn id[T](a: T) -> T { a }