Closed
Description
Compiler version
3.6.2
Minimized code
import scala.io.Source
object Lengths:
opaque type Length = Int
extension (source: Source)
def take(length: Length): IndexedSeq[Char] =
source.take(length).to(IndexedSeq)
end Lengths
Output
7 | def take(length: Length): IndexedSeq[Char] =
| ^
|Extension method take will never be selected
|because Source already has a member with the same name and compatible parameter types.
Expectation
This is the paradigmatic use case and must not warn.
Noticed at https://discord.com/channels/632150470000902164/632150470000902166/1323293799966834688
Related issue #21816