On Mon, 15 Mar 2021 17:59:33 GMT, Jan Lahoda <
[hidden email]> wrote:
> For code like:
> Object o = null;
> boolean b = o instanceof List l;
>
> There should be a raw-type warning for `List`, as we are effectively declaring a variable with a raw type.
>
> Code like:
> Object o = null;
> boolean b = o instanceof List;
>
> Will not produce a warning (as it doesn't so far), as the (raw) type is not used in a problematic context.
This pull request has now been integrated.
Changeset: 9cd21b68
Author: Jan Lahoda <
[hidden email]>
URL:
https://git.openjdk.java.net/jdk/commit/9cd21b68Stats: 17 lines in 3 files changed: 16 ins; 0 del; 1 mod
8263590: Rawtypes warnings should be produced for pattern matching in instanceof
Reviewed-by: mcimadamore
-------------
PR:
https://git.openjdk.java.net/jdk/pull/3016