Strengthen the type of SetterMethodCall

This commit is contained in:
Tom Hvitved
2021-09-27 14:05:28 +02:00
parent 2a4747b27e
commit 317303cdad
2 changed files with 1 additions and 2 deletions

View File

@@ -123,7 +123,7 @@ class MethodCall extends Call, TMethodCall {
* a[0] = 10
* ```
*/
class SetterMethodCall extends MethodCall {
class SetterMethodCall extends MethodCall, TMethodCallSynth {
SetterMethodCall() { this = TMethodCallSynth(_, _, _, true, _) }
final override string getAPrimaryQlClass() { result = "SetterMethodCall" }

View File

@@ -105,7 +105,6 @@ predicate basicStoreStep(Node nodeFrom, DataFlowPublic::LocalSourceNode nodeTo,
*/
private string getSetterCallAttributeName(AST::SetterMethodCall call) {
// TODO: this should be exposed in `SetterMethodCall`
not call instanceof AST::ElementReference and
exists(string setterName |
setterName = call.getMethodName() and result = setterName.prefix(setterName.length() - 1)
)