Closed as not planned
Description
I'm not clear if this is indeed a bug, or a limitation that can be lifted with or without a SIP.
Compiler version
v3.3.0
Minimized code
https://scastie.scala-lang.org/7m7S5DcCQYeZioWaeM2Uqw
object One:
trait Config
object Two:
trait Config
given One.Config = ???
given Two.Config = ???
Output
Double definition:
final lazy given val given_Config: Playground.One.Config in object Playground at line 9 and
final lazy given val given_Config: Playground.Two.Config in object Playground at line 10
Expectation
I expect that the compiler will notice that both givens come from different paths and use them as a full name to prevent the double definition from occurring. So the compiler should desugar to:
final lazy given val given_One_Config = ???
final lazy given val given_Two_Config = ???