Skip to content

Commit 5727e6f

Browse files
committed
make CompoundAssignExpr non-abstract
1 parent cf3f275 commit 5727e6f

File tree

1 file changed

+6
-1
lines changed
  • javascript/ql/src/semmle/javascript

1 file changed

+6
-1
lines changed

javascript/ql/src/semmle/javascript/Expr.qll

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1848,6 +1848,11 @@ class AssignExpr extends @assignexpr, Assignment {
18481848
override Expr getUnderlyingValue() { result = getRhs().getUnderlyingValue() }
18491849
}
18501850

1851+
private class TCompoundAssignExpr =
1852+
@assignaddexpr or @assignsubexpr or @assignmulexpr or @assigndivexpr or @assignmodexpr or
1853+
@assignexpexpr or @assignlshiftexpr or @assignrshiftexpr or @assignurshiftexpr or
1854+
@assignorexpr or @assignxorexpr or @assignandexpr;
1855+
18511856
/**
18521857
* A compound assign expression.
18531858
*
@@ -1858,7 +1863,7 @@ class AssignExpr extends @assignexpr, Assignment {
18581863
* x /= 2
18591864
* ```
18601865
*/
1861-
abstract class CompoundAssignExpr extends Assignment { }
1866+
class CompoundAssignExpr extends TCompoundAssignExpr, Assignment { }
18621867

18631868
/**
18641869
* A compound add-assign expression.

0 commit comments

Comments
 (0)