Skip to content

Commit d184aa7

Browse files
Make FieldRead and FieldWrite extend LValue and RValue
1 parent 910c19e commit d184aa7

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)