When you have a type pattern X in a middle of a pattern *and* you have conversions, then there is an ambiguity,does instanceof Box(X x) means Box(var v) && v instanceof X x or Box(var v) && X x = (X) v;
This is not an ambiguity in the language, it is confusion on the part of the reader :)
In any case, I'm not following your argument here.