Details

      Description

      This compiled in 2.9, no longer.

      class CC(xs: List[_ <: AnyRef]) {
        def f(obj: AnyRef, name: String): AnyRef = null
        def g = xs map (x => f(x,""))
      }
      // t5330.scala:3: error: missing parameter type
      //   def g = xs map (x => f(x,""))
      //                   ^
      

      If it's a type parameter bounded by AnyRef, compiles.

        Issue Links

          Activity

          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 -

          More examples from the mailing list:

          val s: Set[_ >: Char] = Set('A')
          s forall ("ABC" contains _)
          s.forall( c => "ABC".toSeq.contains( c ))
          
          Show
          Jason Zaugg added a comment - More examples from the mailing list: val s: Set[_ >: Char] = Set('A') s forall ("ABC" contains _) s.forall( c => "ABC".toSeq.contains( c ))
          Show
          Paul Phillips added a comment - https://github.com/scala/scala/pull/1514
          Show
          Adriaan Moors added a comment - https://github.com/scala/scala/pull/1624

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development