Skip to content

Cannot define 'opaque type' in class or trait #8874

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

Closed
edolgy opened this issue May 4, 2020 · 0 comments
Closed

Cannot define 'opaque type' in class or trait #8874

edolgy opened this issue May 4, 2020 · 0 comments
Assignees

Comments

@edolgy
Copy link

edolgy commented May 4, 2020

  trait Abc:
    opaque type Log = Double

  class AbcClass extends Abc

  val v = new AbcClass

Fails with : self type of class AbcClass does not conform to self type Any{Log = LazyRef(Double)}

The most simplistic case of this was fixed as 8750

@odersky odersky self-assigned this May 4, 2020
smarter added a commit that referenced this issue Jun 22, 2020
Fix #8874: Strip opaque types when checking self type conformance
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