Skip to content
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

Implicits in self-types #10104

Open
scabug opened this issue Dec 12, 2016 · 2 comments
Open

Implicits in self-types #10104

scabug opened this issue Dec 12, 2016 · 2 comments

Comments

@scabug
Copy link

scabug commented Dec 12, 2016

It would be nice:

class C { implicit this =>
  def f(implicit c: C) = ???
  def g = f // ok
}
class C(x: X, y: Y) { self(implicit x) =>
  def f(implicit z: X) = ???
  def g = f // ok
}
// C.x needn't be a field as in:
class C(implicit x: X, y: Y) { ... }  // don't want implicit param section
class C(x: X, y: Y) {
  implicit private val x1: X = x   // incurs a field
}

Implicit this suggested at #2823

@scabug
Copy link
Author

scabug commented Dec 12, 2016

Imported From: https://issues.scala-lang.org/browse/SI-10104?orig=1
Reporter: @som-snytt
Affected Versions: 2.12.1

@scabug
Copy link
Author

scabug commented Dec 12, 2016

@milessabin said:
See also: #4032. Thematically, if not concretely, related.

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

3 participants