Skip to content

Commit 8d4f7e2

Browse files
authored
Merge pull request #4366 from joefarebrother/field-rvalue-lvalue
Java: Make `FieldRead` and `FieldWrite` extend `RValue` and `LValue`
2 parents 60c310d + d184aa7 commit 8d4f7e2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,14 +1912,10 @@ private module Qualifier {
19121912
}
19131913

19141914
/** An expression that assigns a value to a field. */
1915-
class FieldWrite extends FieldAccess {
1916-
FieldWrite() { exists(Field f | f = getVariable() and isLValue()) }
1917-
}
1915+
class FieldWrite extends FieldAccess, LValue { }
19181916

19191917
/** An expression that reads a field. */
1920-
class FieldRead extends FieldAccess {
1921-
FieldRead() { exists(Field f | f = getVariable() and isRValue()) }
1922-
}
1918+
class FieldRead extends FieldAccess, RValue { }
19231919

19241920
private predicate hasInstantiation(RefType t) {
19251921
t instanceof TypeVariable or

0 commit comments

Comments
 (0)