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

TagMacro: make HKTag summonable for unapplied type lambdas with type bounds #30

Open
neko-kai opened this issue May 10, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers scala2

Comments

@neko-kai
Copy link
Member

The following should work:

trait X
trait XAble[_ <: X]
class Y extends X

def getTag[F[_ <: X]: Tag.auto.T] = Tag[F[Y]]

getTag[XAble]
// Tag[XAble[Y]]
@neko-kai neko-kai added enhancement New feature or request good first issue Good for newcomers labels May 10, 2020
y-yu added a commit to y-yu/izumi-reflect that referenced this issue Mar 27, 2022
y-yu added a commit to y-yu/izumi-reflect that referenced this issue Apr 9, 2022
neko-kai pushed a commit that referenced this issue May 30, 2022
@neko-kai
Copy link
Member Author

This is already fixed on Scala 3:

type `TagK<:Dep`[K[_ <: Dep]] = Tag.auto.T[K]

def t[T[_ <: Dep]: `TagK<:Dep`, A <: Dep: Tag] = Tag[T[A]]

assert(t[Trait3, Dep].tag == Tag[Trait3[Dep]].tag)

But not fixed on Scala 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers scala2
Projects
None yet
Development

No branches or pull requests

1 participant