Skip to content

Commit aac6cf6

Browse files
committed
Swift: add explicative comment
1 parent ffff10a commit aac6cf6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

swift/ql/lib/codeql/swift/elements/expr/CaptureListExpr.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class CaptureListExpr extends Generated::CaptureListExpr {
66
override string toString() { result = this.getClosureBody().toString() }
77

88
override VarDecl getVariable(int index) {
9+
// all capture binding declarations consist of a single named pattern
910
result = this.getBindingDecl(index).getPattern(0).(NamedPattern).getVarDecl()
1011
}
1112
}

0 commit comments

Comments
 (0)