Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indirect covariant comparison involving a higher-kinded type argument fails #469

Open
neko-kai opened this issue Jul 1, 2024 · 4 comments · May be fixed by #519
Open

Indirect covariant comparison involving a higher-kinded type argument fails #469

neko-kai opened this issue Jul 1, 2024 · 4 comments · May be fixed by #519
Labels
💎 Bounty bug Something isn't working

Comments

@neko-kai
Copy link
Member

neko-kai commented Jul 1, 2024

From zio/zio#8215

trait Container[T] {
  def getT(): T
}

trait Service[+O[_] <: Container[_]] {
  def giveHello: String
}

final case class AContainer[T](t: T) extends Container[T] {
  override def getT() = t
} 

final case class MyConcreteService() extends Service[AContainer] {
  def giveHello = "Concrete hello!"
}

object Example extends App {

  implicitly[MyConcreteService <:< Service[Container]] // true

  val left = izumi.reflect.Tag[MyConcreteService]
  val right = izumi.reflect.Tag[Service[Container]]

  println(left <:< right) // false
}
@jdegoes
Copy link
Member

jdegoes commented Nov 8, 2024

/bounty $500

Copy link

algora-pbc bot commented Nov 8, 2024

💎 $500 bounty • ZIO

Steps to solve:

  1. Start working: Comment /attempt #469 with your implementation plan
  2. Submit work: Create a pull request including /claim #469 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to zio/izumi-reflect!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @gkfabs Feb 12, 2025, 3:20:52 AM #519

@pshirshov pshirshov added the bug Something isn't working label Nov 11, 2024
@gkfabs
Copy link

gkfabs commented Feb 12, 2025

/attempt #469

  • use the code to create a unit test
  • find the root cause
Algora profile Completed bounties Tech Active attempts Options
@gkfabs 1 ZIO bounty
Java, Scala,
Ruby & more
Cancel attempt

gkfabs added a commit to gkfabs/izumi-reflect that referenced this issue Feb 12, 2025
Copy link

algora-pbc bot commented Feb 12, 2025

💡 @gkfabs submitted a pull request that claims the bounty. You can visit your bounty board to reward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 Bounty bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants