Skip to content

Cannot summon opaque type typeclass instance if it is defined in object and referred with object prefix #17262

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

Open
jilen opened this issue Apr 14, 2023 · 0 comments

Comments

@jilen
Copy link

jilen commented Apr 14, 2023

Compiler version

3.3.0-RC3

Minimized code

trait Show[A]

given Show[Long] with {}


object Foo {
  opaque type Id = Long

  summon[Show[Id]] // fine.
  summon[Show[Foo.Id]] // won't compile
}

The first summon just fine, but the second not.

Which might be the root cause of #17639

@jilen jilen added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Apr 14, 2023
@nicolasstucki nicolasstucki added area:opaque-types and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants