An object method with its own type parameters, instantiated or inferred at each call. In Scala,
def identity[T](x: T): T = x is a generic method. A method def accept(x: T) inside class Box[T] instead uses a class type parameter fixed by the receiver's type argument; it is not itself a generic method with a separately chosen T on every call. This distinction matters in method overloading. Articles by others on the same topic
There are currently no matching articles.