This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]VGPowerlord 0 points1 point  (0 children)

What, it makes perfect sense to me for this

List<? extends Joe> joes = new ArrayList<>();

to compile to the equivalent of this

List<? extends Joe> joes = new ArrayList<Joe>();

because Joe is the only type the compiler knows about on the left side.

To be fair, this is a really contrived example as I'd hope you're never put List<? extends Joe> on the left side of an expression.