Skip to content

Commit e3a12c5

Browse files
authored
Merge pull request github#4004 from Marcono1234/patch-2
[Java] Clarify Wildcard.hasUpperBound() doc
2 parents c20d763 + 0e54b49 commit e3a12c5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

java/ql/src/semmle/code/java/Generics.qll

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,16 @@ class TypeVariable extends BoundedType, @typevariable {
194194
* and the second wildcard has a lower bound of `Float`.
195195
*/
196196
class Wildcard extends BoundedType, @wildcard {
197-
/** Holds if this wildcard has an upper bound. */
197+
/**
198+
* Holds if this wildcard is either unconstrained (i.e. `?`) or
199+
* has a type bound.
200+
*/
201+
override predicate hasTypeBound() { BoundedType.super.hasTypeBound() }
202+
203+
/**
204+
* Holds if this wildcard is either unconstrained (i.e. `?`) or
205+
* has an upper bound.
206+
*/
198207
predicate hasUpperBound() { wildcards(this, _, 1) }
199208

200209
/** Holds if this wildcard has a lower bound. */

0 commit comments

Comments
 (0)