Skip to content

Commit 317303c

Browse files
committed
Strengthen the type of SetterMethodCall
1 parent 2a4747b commit 317303c

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

ql/lib/codeql/ruby/ast/Call.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class MethodCall extends Call, TMethodCall {
123123
* a[0] = 10
124124
* ```
125125
*/
126-
class SetterMethodCall extends MethodCall {
126+
class SetterMethodCall extends MethodCall, TMethodCallSynth {
127127
SetterMethodCall() { this = TMethodCallSynth(_, _, _, true, _) }
128128

129129
final override string getAPrimaryQlClass() { result = "SetterMethodCall" }

ql/lib/codeql/ruby/typetracking/TypeTrackerSpecific.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ predicate basicStoreStep(Node nodeFrom, DataFlowPublic::LocalSourceNode nodeTo,
105105
*/
106106
private string getSetterCallAttributeName(AST::SetterMethodCall call) {
107107
// TODO: this should be exposed in `SetterMethodCall`
108-
not call instanceof AST::ElementReference and
109108
exists(string setterName |
110109
setterName = call.getMethodName() and result = setterName.prefix(setterName.length() - 1)
111110
)

0 commit comments

Comments
 (0)