Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.9.1, Scala 2.10.0
    • Fix Version/s: Scala 2.10.0-M3, Scala 2.10.0
    • Component/s: None
    • Labels:
      None

      Description

      Ok:

      val s = Seq(1)
      val f = (s /: Seq(99))((s,c) => s.patch(0,Seq(c),1))
      

      Won't compile:

      val s = Seq(1).view
      val f = (s /: Seq(99))((s,c) => s.patch(0,Seq(c),1))
      // error: type mismatch;
      // found   : scala.collection.SeqView[Int,Seq[_]]
      // required: java.lang.Object with scala.collection.SeqView[Int,Seq[Int]]
      //       val f = (s /: Seq(99))((s,c) => s.patch(0,Seq(c),1))
      //                                              ^
      

      Will compile, but weird results?

      val s = Seq(1).view.asInstanceOf[Seq[Int]]
      val f = (s /: Seq(99))((s,c) => s.patch(0,Seq(c),1))
      f.length == f.toList.length  //  false???  1 == 2
      

        Attachments

          Activity

            People

            • Assignee:
              jsuereth Josh Suereth
              Reporter:
              refried Arya Irani
            • Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: