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

Expansion of this(args) to this.apply(args) should substitute ThisType into the type signature of apply() #6206

Closed
scabug opened this issue Aug 8, 2012 · 6 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Aug 8, 2012

class Outer {
  def apply( position : Inner ) {}
  class Inner
  apply(new Inner)
  this (new Inner) // error
}
class Outer {

  self =>

  def apply( position : Inner ) : Boolean = true

  class Inner( ) {

    def testMe = {
      self.apply( this ) // a) this works
      self( this ) // b) this does not work!
    }
  }
}

https://groups.google.com/d/msg/scala-user/U2kDHtUxZy4/ZeNGqX0Uu10J

@scabug
Copy link
Author

@scabug scabug commented Aug 8, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6206?orig=1
Reporter: @retronym
Affected Versions: 2.8.0, 2.9.0, 2.10.0-M6
See #5958

@scabug
Copy link
Author

@scabug scabug commented Aug 8, 2012

@retronym said:
Something along these lines is needed:

https://github.com/retronym/scala/compare/ticket/6206

@scabug
Copy link
Author

@scabug scabug commented Aug 8, 2012

@scabug
Copy link
Author

@scabug scabug commented Oct 14, 2012

@scabug
Copy link
Author

@scabug scabug commented Jan 22, 2013

@adriaanm said:
reopening for 2.10.1-RC1 backport

@scabug
Copy link
Author

@scabug scabug commented Jan 26, 2013

@retronym said:
backport: scala/scala#1979

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants