When you click on *:, you get the wrong extension method(cons)
extension [F[_], A](fa: F[A])
@annotation.targetName("cons")
def *:[G[x] >: F[x], B <: Tuple](gb: G[B])(using InvariantSemigroupal[G]): G[A *: B] =
fa.product(gb).imap[A *: B] { case (hd, tl) => hd *: tl } { case hd *: tl => (hd, tl) }
@annotation.targetName("pair")
@annotation.nowarn
def *:[G[x] >: F[x], B](gb: G[B])(using InvariantSemigroupal[G]): G[A *: B *: EmptyTuple] =
fa.product(gb).imap[A *: B *: EmptyTuple] { case (a, b) => a *: b *: EmptyTuple } {
case a *: b *: EmptyTuple => (a, b)
}
Expected behavior
@annotation.targetName("pair")
@annotation.nowarn
def *:[G[x] >: F[x], B](gb: G[B])(using InvariantSemigroupal[G]): G[A *: B *: EmptyTuple] =
fa.product(gb).imap[A *: B *: EmptyTuple] { case (a, b) => a *: b *: EmptyTuple } {
case a *: b *: EmptyTuple => (a, b)
}
Describe the bug
When you click on
*:
, you get the wrong extension method(cons
)Expected behavior
Operating system
macOS
Editor/Extension
VS Code
Version of Metals
v1.3.2
Extra context or search terms
No response