Closed
Description
Compiler version
3.1.2
Minimized code
//> using scala "3.1.2"
trait Thing[A]
trait Box[A]
given Thing[Box[Int]] = new Thing[Box[Int]] {}
given Thing[Box[String]] = new Thing[Box[String]] {}
Output
Double definition:
final lazy given val given_Thing_Box: Thing[Box[Int]] in package object bug$package at line 6 and
final lazy given val given_Thing_Box: Thing[Box[String]] in package object bug$package at line 7
bloop
Expectation
The code should compile and the instances of Thing
for both Box[String]
and Box[Int]
should be available.