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

Compiler fails using OptionT with type alias

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Duplicate
    • Affects Version/s: Scala 2.9.1
    • Fix Version/s: None
    • Labels:
      None

      Description

      Trying to compile

      import scalaz.OptionT.optionT
      type Foo[A] = Option[Option[A]]
      val x: Foo[Int] = Some(Some(3))
      optionT( x )

      results in a compiler exception

      java.lang.IllegalArgumentException: transpose requires all collections have the same size

        Issue Links

          Activity

          Hide
          Josh Suereth added a comment -

          Would you mind creating a more minimal test case? We don't want to have to build all of Scalaz7 just to create a test case for this.

          Thanks!

          Show
          Josh Suereth added a comment - Would you mind creating a more minimal test case? We don't want to have to build all of Scalaz7 just to create a test case for this. Thanks!
          Hide
          Andrea Ferretti added a comment -

          Sorry, I am quite new to Scala (as in less than 1 month). I actually do not know what is going wrong here. This is as minimal as I could get, but I do not know the internals of Scalaz, hence I do not know how to make it simpler.

          Show
          Andrea Ferretti added a comment - Sorry, I am quite new to Scala (as in less than 1 month). I actually do not know what is going wrong here. This is as minimal as I could get, but I do not know the internals of Scalaz, hence I do not know how to make it simpler.
          Hide
          Ben James added a comment - - edited

          [Attached testcase.scala]

          Compiling with scalac produces:

          error: java.lang.IllegalArgumentException: transpose requires all collections have the same size

          Show
          Ben James added a comment - - edited [Attached testcase.scala] Compiling with scalac produces: error: java.lang.IllegalArgumentException: transpose requires all collections have the same size
          Hide
          Jason Zaugg added a comment -

          This is almost certainly a duplicate of SI-5683. It doesn't crash in 2.10.0 RCs. It still doesn't infer the the parameter.

          Show
          Jason Zaugg added a comment - This is almost certainly a duplicate of SI-5683 . It doesn't crash in 2.10.0 RCs. It still doesn't infer the the parameter.

            People

            • Assignee:
              Unassigned
              Reporter:
              Andrea Ferretti
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development