Skip to content

Bindings in structural self types are not picked up correctly. #5279

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
odersky opened this issue Oct 17, 2018 · 0 comments
Closed

Bindings in structural self types are not picked up correctly. #5279

odersky opened this issue Oct 17, 2018 · 0 comments

Comments

@odersky
Copy link
Contributor

odersky commented Oct 17, 2018

The following typechecks:

trait TS { type T = Int }
trait T { self: TS =>
  type T
  def lift(x: Int): T = x
}

But this variant doesn't:

trait T { self: { type T = Int } =>
  type T
  def lift(x: Int): T = x  // error: expected T, found: Int
}

The two should behave the same.

odersky added a commit to dotty-staging/dotty that referenced this issue Oct 18, 2018
odersky added a commit to dotty-staging/dotty that referenced this issue Oct 18, 2018
odersky added a commit to dotty-staging/dotty that referenced this issue Oct 18, 2018
odersky added a commit to dotty-staging/dotty that referenced this issue Oct 18, 2018
Be more where we create symbolic refs from named ones.
odersky added a commit to dotty-staging/dotty that referenced this issue Oct 26, 2018
Be more where we create symbolic refs from named ones.
odersky added a commit to dotty-staging/dotty that referenced this issue Oct 26, 2018
Be more where we create symbolic refs from named ones.
odersky added a commit to dotty-staging/dotty that referenced this issue Oct 29, 2018
Be more where we create symbolic refs from named ones.
@odersky odersky closed this as completed in c3869dd Nov 1, 2018
odersky added a commit that referenced this issue Nov 1, 2018
Fix #5279: Be more careful where we create symbolic refs from named ones
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