Closed ajaychandran closed 12 months ago
You're right. The problems seems to be caused by:
trait RefinedTypeOps[A, C, T](using val rtc: RuntimeConstraint[A, C]):
/**
* R
* @return
*/
inline protected given RuntimeConstraint[A, C] = rtc
Here, both the inline protected given
and rtc
are given instances, causing the ambiguity error. It seems that implicit trait parameters keep their implicit behaviour. Not sure it's a Scala bug or something intented.
Anyway, it should be easily fixable by removing the second given and instance and making rtc
protected
Describe the bug Scala environment: JVM Scala version: 3.3.1 Iron version: 2.2.1-10-cbbd01-SNAPSHOT
Reproduction steps
Expected behavior Compiles successfully.
Current behavior
Explicitly specifying the instance works but is this an implementation detail leaking out?