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

Implicit resolution falls short when encountering literal type argument aliasing #10453

Closed
soronpo opened this issue Aug 5, 2017 · 2 comments

Comments

@soronpo
Copy link

soronpo commented Aug 5, 2017

At first I encountered this issue in Typelevel Scala:
typelevel/scala#162

After fiddling with LBS and shapeless's Witness, I hit this error again, so it should be handled as an LBS issue.

  import shapeless.Witness
  val three = Witness(3)
  type Three = three.T
  type Something[T] = shapeless.Witness.Aux[T]
  implicitly[shapeless.Witness.Aux[Three]] //works
  implicitly[Something[Three]] //implicit not found

As far as I manage to figure out, you need all three features to hit this error:

  • type aliasing
  • literal type argument
  • implicit resolution

I recommend, if possible, to resolve this before SIP23 (scala/scala#5310) is merged, since it might trip newcomers to the feature.

@hrhino
Copy link

hrhino commented Aug 15, 2017

I suspect that this might be the same issue, or at least related to, the .deconst/.dealias /&c. issue @retronym brought up over here.

@soronpo
Copy link
Author

soronpo commented Nov 3, 2017

This unsolvable without a SIP, so SIP23 took care of this. See typelevel/scala#162

@soronpo soronpo closed this as completed Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants