Skip to content

Commit 95f8f85

Browse files
committed
Ruby: fix allowed completions for desugared CasePatterns
1 parent aacba0b commit 95f8f85

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ruby/ql/lib/codeql/ruby/controlflow/internal/Completion.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ private predicate inMatchingContext(AstNode n) {
227227
or
228228
n instanceof CasePattern
229229
or
230+
n = any(CasePattern c).getDesugared()
231+
or
230232
n.(Trees::DefaultValueParameterTree).hasDefaultValue()
231233
}
232234

0 commit comments

Comments
 (0)