Skip to content

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

Open
@LPTK

Description

@LPTK

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions