import java.util.List; public aspect MixedParameterizedAndTypeVariables { declare warning : execution(List G.foo(List)) : "erasure match"; declare warning : execution(List G.foo(List)) : "mixed match"; declare warning : execution(* *(List)) : "params only match"; declare warning : execution(List G.foo(List)) : "wrong erasure"; } class G { List foo(List ls) { return null; } }