This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Generics  RSS feed

 
Meena R. Krishnan
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Source JMMock


question is, at line 1, the type parameter <T> is given but not being used and the compiler is not complaining. Is such a syntax ok?
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's clearly redundant to have <T> there and not being used. Syntax-wise it is OK, so the compiler need not complain.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!