diff --git a/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/ScopeManager.kt b/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/ScopeManager.kt index 1eef33d493..ddcfa11d0e 100644 --- a/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/ScopeManager.kt +++ b/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/ScopeManager.kt @@ -908,7 +908,7 @@ class ScopeManager : ScopeProvider { */ fun lookupSymbolByNameOfNode( node: HasNameAndLocation, - scope: Scope? = currentScope, + scope: Scope? = node.scope, predicate: ((Declaration) -> Boolean)? = null, ): List { return lookupSymbolByName(node.name, node.language, node.location, scope, predicate)