Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review comments
  • Loading branch information
hvitved authored and yoff committed Jun 18, 2026
commit f2bb30ee0f29aed506d0365a2a1cd13e654cb020
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,9 @@ module Impl {
class NestedFunctionAccess extends LocalAccess {
private Function f;

NestedFunctionAccess() { f = super.getLocal().getDefiningNode() }

/** Gets the function being accessed. */
Function getFunction() { result = super.getLocal().getDefiningNode() }
Function getFunction() { result = f }
}
}
6 changes: 4 additions & 2 deletions shared/namebinding/codeql/namebinding/LocalNameBinding.qll
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ signature module LocalNameBindingInputSig<LocationSig Location> {
* // x is not in scope here
* }
* ```
*
* If a local declaration inside the condition is a shadowing sibling declaration
* (see below), then it should use the declaration itself as scope, otherwise it
* should use the condition as scope.
*/
class Conditional extends AstNode {
/** Gets the condition of this conditional. */
Expand Down Expand Up @@ -153,8 +157,6 @@ module LocalNameBinding<LocationSig Location, LocalNameBindingInputSig<Location>
implicitDeclInScope(_, this)
or
isTopScope(this)
or
lookupStartsAt(_, this)
}
}

Expand Down