Skip to content

Regression since 2.12.7: missing subtyping proofs involving singleton types #11302

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
LPTK opened this issue Dec 10, 2018 · 3 comments
Open

Comments

@LPTK
Copy link

LPTK commented Dec 10, 2018

The following works in 2.12.6, but fails in both 2.12.7 and 2.12.8:

class A extends B
class B
val a = new A
implicitly[a.type <:< a.type with B]

There is no reason it should not work, though. The a.type <:< a.type with B is true and recognized by the compiler, as the following demonstrates, which works in all versions:

conforms[a.type with B] : a.type <:< a.type with B

These subtyping relationships are sometimes useful; for a concrete example see: https://github.com/epfldata/squid/blob/7df295499b7371980b5574f87e0f56f2c20e3a5d/core/src/main/scala/squid/quasi/QuasiBase.scala#L133-L136

LPTK added a commit to epfldata/squid that referenced this issue Dec 10, 2018
@SethTisue
Copy link
Member

do we have a guess what scala/scala PR might have altered this behavior? perhaps we'll need to bisect.

@milessabin does this look like your territory...?

@milessabin
Copy link

It's possible. I'll take a look.

@milessabin
Copy link

@SethTisue I'm afraid I'm not going to have time to look at this for the next week or so.

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

3 participants