E1053: wrong number of type arguments
A generic type or verb takes exactly the type arguments that its declaration lists.
A generic type or verb takes exactly the type arguments that its declaration
lists. Box[T] takes one, so Box[Int, Int] is rejected, and so is a type
argument given to something that is not generic. Missing and extra arguments
are both reported. The message names the declaration and says how many
arguments were expected and how many were found. The error points at the
type that has the wrong number of arguments, or at the type arguments of
the call.
Example
A generic verb called with more type arguments than it declares is rejected
the same way: identity[Int, Int](item: v) on verb identity[T].
Fix
Give exactly the arguments that the declaration lists. Remove the brackets at a call of a verb that is not generic.
Run actus explain E1053 in your terminal to read this entry offline. Browse Ownership & types or all error codes.