docs/_docs/reference/error-codes/E053.md
This error is emitted when type parameters are provided to a type that doesn't accept any type parameters.
You specified type parameters for a type that is not declared to take any. This can happen when:
val x: Int[String] = 42
-- [E053] Type Error: example.scala:1:7 ----------------------------------------
1 |val x: Int[String] = 42
| ^^^^^^^^^^^
| Int does not take type parameters
|-----------------------------------------------------------------------------
| Explanation (enabled by `-explain`)
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| You specified a type parameter Ident(String) for Int, which is not
| declared to take any.
-----------------------------------------------------------------------------
// Remove the type parameters from non-generic types
val x: Int = 42
// Use a type that does accept parameters
val x: List[Int] = List(42)
// Or define your own generic type
class Box[T](value: T)
val x: Box[Int] = Box(42)