diff --git a/cpg-language-go/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/golang/ExpressionHandler.kt b/cpg-language-go/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/golang/ExpressionHandler.kt index 6055a14c7a6..488bedb528f 100644 --- a/cpg-language-go/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/golang/ExpressionHandler.kt +++ b/cpg-language-go/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/golang/ExpressionHandler.kt @@ -149,16 +149,7 @@ class ExpressionHandler(frontend: GoLanguageFrontend) : return literal } - val ref = newReference(ident.name, rawNode = ident) - - // Check, if this refers to a package import - val import = frontend.currentTU?.getIncludeByName(ident.name) - // Then set the refersTo, because our regular CPG passes will not resolve them - if (import != null) { - ref.refersTo = import - } - - return ref + return newReference(ident.name, rawNode = ident) } private fun handleIndexExpr(indexExpr: GoStandardLibrary.Ast.IndexExpr): SubscriptExpression {