C#: Update condition for UnaryOperators to also handle user-defined instance increment and decrement operators.

This commit is contained in:
Michael Nebel
2026-05-05 09:49:41 +02:00
parent 73b5ff5846
commit 3a55c9d48a

View File

@@ -613,6 +613,9 @@ class UnaryOperator extends Operator {
this.getNumberOfParameters() = 1 and
not this instanceof ConversionOperator and
not this instanceof CompoundAssignmentOperator
or
// Instance increment and decrement operators don't have a parameter (only a qualifier).
this.getNumberOfParameters() = 0 and not this.isStatic()
}
}