Scala Programming Language
  1. Scala Programming Language
  2. SI-6206

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.8.0, Scala 2.9.0, Scala 2.10.0-M6
    • Fix Version/s: Scala 2.10.1
    • Component/s: Type Checker
    • Labels:

      Description

      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

        Issue Links

          Activity

          Hide
          Jason Zaugg added a comment -

          Something along these lines is needed:

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

          Show
          Jason Zaugg added a comment - Something along these lines is needed: https://github.com/retronym/scala/compare/ticket/6206
          Show
          Jason Zaugg added a comment - https://github.com/scala/scala/commit/ae2847
          Show
          Paul Phillips added a comment - https://github.com/scala/scala/pull/1499
          Hide
          Adriaan Moors added a comment -

          reopening for 2.10.1-RC1 backport

          Show
          Adriaan Moors added a comment - reopening for 2.10.1-RC1 backport
          Hide
          Jason Zaugg added a comment -
          Show
          Jason Zaugg added a comment - backport: https://github.com/scala/scala/pull/1979

            People

            • Assignee:
              Jason Zaugg
              Reporter:
              Jason Zaugg
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development