diff --git a/mtags/src/main/scala-3/scala/meta/internal/pc/CompilerSearchVisitor.scala b/mtags/src/main/scala-3/scala/meta/internal/pc/CompilerSearchVisitor.scala
index feb6c62931e..13a356a506a 100644
--- a/mtags/src/main/scala-3/scala/meta/internal/pc/CompilerSearchVisitor.scala
+++ b/mtags/src/main/scala-3/scala/meta/internal/pc/CompilerSearchVisitor.scala
@@ -28,7 +28,7 @@ class CompilerSearchVisitor(
owner.isStatic && owner.isPublic
private def isAccessible(sym: Symbol): Boolean = try
- sym != NoSymbol && sym.isPublic && sym.isStatic ||
+ sym.isAccessibleFrom(ctx.owner.info) ||
isAccessibleImplicitClass(sym)
catch
case err: AssertionError =>
diff --git a/tests/slow/src/test/scala/tests/feature/ImportMissingSymbolCrossLspSuite.scala b/tests/slow/src/test/scala/tests/feature/ImportMissingSymbolCrossLspSuite.scala
index 7eea38fc54e..7c0713da134 100644
--- a/tests/slow/src/test/scala/tests/feature/ImportMissingSymbolCrossLspSuite.scala
+++ b/tests/slow/src/test/scala/tests/feature/ImportMissingSymbolCrossLspSuite.scala
@@ -230,4 +230,64 @@ class ImportMissingSymbolCrossLspSuite
scalaVersion = V.scala3,
)
+ check(
+ "i6732-happy",
+ s"""|package example.a {
+ | private [example] object A {
+ | val foo = "foo"
+ | }
+ |}
+ |package example.b {
+ | object B {
+ | val bar = <>.foo
+ | }
+ |}
+ |""".stripMargin,
+ s"""|${ImportMissingSymbol.title("A", "example.a")}
+ |${CreateNewSymbol.title("A")}
+ |""".stripMargin,
+ s"""|import example.a.A
+ |package example.a {
+ | private [example] object A {
+ | val foo = "foo"
+ | }
+ |}
+ |package example.b {
+ | object B {
+ | val bar = A.foo
+ | }
+ |}
+ |""".stripMargin,
+ scalaVersion = V.scala3,
+ )
+
+ check(
+ "i6732-negative (private)",
+ s"""|package example.a {
+ | private object A {
+ | val foo = "foo"
+ | }
+ |}
+ |package example.b {
+ | object B {
+ | val bar = <>
+ | }
+ |}
+ |""".stripMargin,
+ "",
+ s"""|package example.a {
+ | private object A {
+ | val foo = "foo"
+ | }
+ |}
+ |package example.b {
+ | object B {
+ | val bar = A
+ | }
+ |}
+ |""".stripMargin,
+ expectNoDiagnostics = false,
+ filterAction = _.getTitle() == ImportMissingSymbol.title("A", "example.a"),
+ scalaVersion = V.scala3,
+ )
}