Open
Description
Compiler version
3.2.2
Minimized code
//> using scala "3.2.2"
class FooOps[A](self: A) extends AnyVal {
def foo = ???
@annotation.targetName("foo2")
def foo[B] = ???
}
Or the simpler:
//> using scala "3.2.2"
class IntOps(self: Int) extends AnyVal {
def foo = ???
@annotation.targetName("foo2")
def foo[A] = ???
}
Output
Error: Not enough type arguments for FooOps.foo$extension[B, A]
expected: [B, A]
actual: [A]
and
Error: method foo$extension in object IntOps does not take parameters
Renaming the overload to something else avoids the bug. Removing AnyVal
also avoids the bug.