-
Notifications
You must be signed in to change notification settings - Fork 13.4k
is this a Generic bug? #3275
Copy link
Copy link
Closed
Labels
By DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadDeprecated - use "Working as Intended" or "Design Limitation" insteadCanonicalThis issue contains a lengthy and complete description of a particular problem, solution, or designThis issue contains a lengthy and complete description of a particular problem, solution, or designQuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code
Metadata
Metadata
Assignees
Labels
By DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadDeprecated - use "Working as Intended" or "Design Limitation" insteadCanonicalThis issue contains a lengthy and complete description of a particular problem, solution, or designThis issue contains a lengthy and complete description of a particular problem, solution, or designQuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code
consider the following class.
theoretically, the above last line:
should have compile time error since the generic of class GenericPractice should only allow CouponInfo in method add, not Snake.
However, the compile still passes which violates the fundamental concept of generic.
is this a bug?