mirror of
https://github.com/github/codeql.git
synced 2026-05-03 20:58:03 +02:00
Java: Make implicit this receivers explicit
This commit is contained in:
@@ -17,9 +17,9 @@ library class BoundKind extends string {
|
||||
|
||||
predicate isUpper() { this = "<=" }
|
||||
|
||||
predicate providesLowerBound() { isEqual() or isLower() }
|
||||
predicate providesLowerBound() { this.isEqual() or this.isLower() }
|
||||
|
||||
predicate providesUpperBound() { isEqual() or isUpper() }
|
||||
predicate providesUpperBound() { this.isEqual() or this.isUpper() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,19 +19,19 @@ import java
|
||||
*/
|
||||
class ArrayCast extends CastExpr {
|
||||
ArrayCast() {
|
||||
getExpr() instanceof ArrayCreationExpr and
|
||||
getType() instanceof Array
|
||||
this.getExpr() instanceof ArrayCreationExpr and
|
||||
this.getType() instanceof Array
|
||||
}
|
||||
|
||||
/** The type of the operand expression of this cast. */
|
||||
Array getSourceType() { result = getExpr().getType() }
|
||||
Array getSourceType() { result = this.getExpr().getType() }
|
||||
|
||||
/** The result type of this cast. */
|
||||
Array getTargetType() { result = getType() }
|
||||
Array getTargetType() { result = this.getType() }
|
||||
|
||||
Type getSourceComponentType() { result = getSourceType().getComponentType() }
|
||||
Type getSourceComponentType() { result = this.getSourceType().getComponentType() }
|
||||
|
||||
Type getTargetComponentType() { result = getTargetType().getComponentType() }
|
||||
Type getTargetComponentType() { result = this.getTargetType().getComponentType() }
|
||||
}
|
||||
|
||||
predicate uncheckedCastType(RefType t) {
|
||||
|
||||
Reference in New Issue
Block a user