We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cad6582 commit a5e0669Copy full SHA for a5e0669
swift/ql/lib/codeql/swift/elements/pattern/NamedPattern.qll
@@ -19,8 +19,9 @@ class NamedPattern extends Generated::NamedPattern {
19
* This will be the case as long as the variable is subsequently used.
20
*/
21
VarDecl getVarDecl() {
22
- this.getImmediateEnclosingPattern*() = result.getParentPattern().getFullyUnresolved() and
23
- result.getName() = this.getName()
+ this.getImmediateEnclosingPattern*() = result.getImmediateParentPattern() and
+ pragma[only_bind_out](pragma[only_bind_into](result).getName()) =
24
+ pragma[only_bind_out](pragma[only_bind_into](this).getName())
25
}
26
27
override string toString() { result = this.getName() }
0 commit comments