A.scala:12:50: Implicit value $anonfun was found in a package prefix of the required type, which is not part of the implicit scope in Scala 3.
[error] For migration, add `import a1.Main.$anonfun`.
[error] Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=a1.Main.f
[error] def f[A](x: Seq[a1.a2.MyClass[A]]): Seq[A] = x.flatten
[error] ^
Reproduction steps
Scala version: 2.13.13
build.sbt
A.scala
Problem