Skip to content

Regression in valskalla/odin #18163

Closed
@WojciechMazur

Description

@WojciechMazur

Compiler version

Fails in 3.3.1-RC1
Works in 3.3.0
Bisect points to 12a8051

Minimized code

Needs further minimization, contramap function is provided using extension method (implemented as Scala2 implicit class LoggerSyntax)

//> using dep com.github.valskalla::odin-core:0.13.0
//> using dep org.typelevel::cats-effect:3.5.1

import cats.effect.{IO}
import cats.syntax.all._
import io.odin._
import io.odin.syntax.LoggerSyntax
import io.odin.loggers.WriterTLogger

@main def Test =
  val fails = new WriterTLogger[IO].contramap(identity) 
  val works = LoggerSyntax(new WriterTLogger[IO]).contramap(identity)

Output

[error] Found:    io.odin.loggers.WriterTLogger[cats.effect.IO]
[error] Required: ?{ contramap: ? }
[error] Note that implicit conversions cannot be applied because they are ambiguous;
[error] both method catsContravariantMonoidalForOrdering in object Invariant and method catsContravariantMonoidalForPartialOrdering in object Invariant match type cats.Contravariant[F]
[error]   val fails = new WriterTLogger[IO].contramap(identity)

Expectation

Should compile

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions