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

inference regression with aliased existential

    Details

      Description

      This almost has to be a duplicate of something, but I can't find it and it's bad, so opening until I or someone finds the duplicate. This compiles with 2.9.2.

      object Test {
        case class CC[T](key: T)
        type Alias[T] = Seq[CC[T]]
      
        def f(xs: Seq[CC[_]]) = xs map { case CC(x) => CC(x) }    // ok
        def g(xs: Alias[_])   = xs map { case CC(x) => CC(x) }    // fails
        // ./a.scala:11: error: missing parameter type for expanded function
        // The argument types of an anonymous function must be fully known. (SLS 8.5)
        // Expected type was: ?
        //   def g(xs: Alias[_])   = xs map { case CC(x) => CC(x) }    // fails
        //                                  ^
        // one error found
      }
      

        Issue Links

          Activity

          Hide
          Jason Zaugg added a comment -

          My proposed fix for SI-5330 also cures this one, although the it's not immediately clear to me why that is.

          https://github.com/retronym/scala/compare/ticket/5330-4

          Show
          Jason Zaugg added a comment - My proposed fix for SI-5330 also cures this one, although the it's not immediately clear to me why that is. https://github.com/retronym/scala/compare/ticket/5330-4
          Show
          Adriaan Moors added a comment - https://github.com/scala/scala/pull/1074
          Hide
          Adriaan Moors added a comment -

          demoting to major since it's too hard to fix properly for 2.10.0

          Show
          Adriaan Moors added a comment - demoting to major since it's too hard to fix properly for 2.10.0
          Hide
          Jason Zaugg added a comment -

          Regressed when a fix for SI-4560 was merged.

          https://github.com/scala/scala/commit/e956919

          Show
          Jason Zaugg added a comment - Regressed when a fix for SI-4560 was merged. https://github.com/scala/scala/commit/e956919
          Show
          Adriaan Moors added a comment - https://github.com/scala/scala/pull/1624
          Hide
          Jason Zaugg added a comment -

          This was not fixed in 2.10.0, changing Fix Version to 2.10.1.

          Show
          Jason Zaugg added a comment - This was not fixed in 2.10.0, changing Fix Version to 2.10.1.

            People

            • Assignee:
              Jason Zaugg
              Reporter:
              Paul Phillips
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development