Skip to content

Commit a6e69eb

Browse files
committed
Revert "Rust: avoid classes with multiple getAPrimaryQLClass result"
This reverts commit 110d2ea.
1 parent bd19661 commit a6e69eb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,8 @@ module Impl {
430430
}
431431

432432
/** A variable access. */
433-
class VariableAccess extends PathExprBaseImpl::PathExprBase instanceof VariableAccessCand {
433+
abstract class VariableAccess extends PathExprBaseImpl::PathExprBase instanceof VariableAccessCand
434+
{
434435
private string name;
435436
private Variable v;
436437

@@ -443,6 +444,8 @@ module Impl {
443444
predicate isCapture() { this.getEnclosingCallable() != v.getPat().getEnclosingCallable() }
444445

445446
override string toString() { result = name }
447+
448+
override string getAPrimaryQlClass() { result = "VariableAccess" }
446449
}
447450

448451
/** Holds if `e` occurs in the LHS of an assignment or compound assignment. */

0 commit comments

Comments
 (0)