Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: Scala 2.11.0-M4
    • Component/s: None
    • Labels:
      None

      Description

      % rcscala
      Welcome to Scala version 2.10.0-RC5 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_10).
      Type in expressions to have them evaluated.
      Type :help for more information.
      
      scala> def f(x: scala.collection.GenSeqLike[_,_]): AnyRef = x
      f: (x: scala.collection.GenSeqLike[_, _])AnyRef
      
      scala> f(Nil).getClass
      res0: Class[_ <: AnyRef] = class scala.collection.parallel.package$$anon$2
      

      See https://groups.google.com/forum/?fromgroups=#!topic/scala-internals/cwEyQCmjX24 for some elaboration.

        Activity

        Hide
        Adriaan Moors added a comment - - edited

        Jason said:

        I was recently thinking how useful such a facility would be for extension methods: if the implicit went from Wrapped => (@foo Wrapper) and (@foo A) !<:< Any, we might avoid the "implicit Any/AnyRef disaster" @paulp brought up on -internals recently. But perhaps a more mundane solution is wiser...

        Show
        Adriaan Moors added a comment - - edited Jason said : I was recently thinking how useful such a facility would be for extension methods: if the implicit went from Wrapped => (@foo Wrapper) and (@foo A) !<:< Any, we might avoid the "implicit Any/AnyRef disaster" @paulp brought up on -internals recently. But perhaps a more mundane solution is wiser...
        Show
        Jason Zaugg added a comment - https://github.com/scala/scala/pull/2625

          People

          • Assignee:
            Paul Phillips
            Reporter:
            Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development