File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
java/ql/lib/semmle/code/java/dataflow Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,13 @@ private module Input implements TypeFlowInput<Location> {
202202 t1e = t2e and
203203 unbound ( t2 ) and
204204 not unbound ( t1 )
205+ or
206+ t1e = t2e and
207+ exists ( int pos |
208+ partiallyUnbound ( t2 , pos ) and
209+ not partiallyUnbound ( t1 , pos ) and
210+ not unbound ( t1 )
211+ )
205212 )
206213 }
207214
@@ -370,6 +377,11 @@ private module Input implements TypeFlowInput<Location> {
370377 )
371378 }
372379
380+ /** Holds if `t` is a parameterised type with unrestricted type argument at position `pos`. */
381+ private predicate partiallyUnbound ( ParameterizedType t , int pos ) {
382+ unconstrained ( t .getTypeArgument ( pos ) )
383+ }
384+
373385 Type getErasure ( Type t ) { result = t .getErasure ( ) }
374386
375387 Type getAnAncestor ( Type sub ) { result = sub .getAnAncestor ( ) }
You can’t perform that action at this time.
0 commit comments