Skip to content

Commit 8018c15

Browse files
authored
Merge pull request #314 from github/hvitved/setter-method-call-base
Strengthen the type of `SetterMethodCall`
2 parents 79c2f09 + 317303c commit 8018c15

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)