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

Method "List#orElse(PartialFunction[A, B])" has malformed generic signature

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Misc Compiler
    • Labels:
      None
    • Environment:

      reflection compiler classfile

      Description

      > What steps will reproduce the problem (please be specific and use > wikiformatting)?

      Calling .getGenericReturnType or .getGenericParameterTypes on that specific method object fails with a jl.reflect.GenericSignatureFormatError

      It is possible that the Scala compiler produces invalid classfiles for other cases as well, but I only had problems with this method for now.

        classOf[List[_]].getMethods.find(_.getName == "orElse").get.getGenericReturnType
      

      > What is the expected behavior?
      a return value of type jl.reflect.Type

      > What do you see instead?
      a java.lang.reflect.GenericSignatureFormatError

      > What versions of the following are you using?
      > Scala:
      I was using Scala 2.8.1

      > Java:
      $$ java -version
      java version "1.6.0_20"
      OpenJDK Runtime Environment (IcedTea6 1.9.2) (6b20-1.9.2-0ubuntu1)
      OpenJDK Client VM (build 19.0-b09, mixed mode, sharing)

      Operating system:
      Ubuntu Linux 10.10

        Activity

        Hide
        Marko Mikulicic added a comment -

        Replying to [comment:36 sentimental]:
        > That's exactly my point.

        Yes sorry I was confused because we have two distinct issues in this thread, one for the missing decls of Function1, and the other of the incorrect type bounds of orElse.

        Show
        Marko Mikulicic added a comment - Replying to [comment:36 sentimental] : > That's exactly my point. Yes sorry I was confused because we have two distinct issues in this thread, one for the missing decls of Function1, and the other of the incorrect type bounds of orElse.
        Hide
        bryan hunt added a comment -

        Remote communication is always difficult.

        It is often the case whereby one finds oneself taking at cross-purposes.

        So are we now in agreement about the problem and it's solution?

        Show
        bryan hunt added a comment - Remote communication is always difficult. It is often the case whereby one finds oneself taking at cross-purposes. So are we now in agreement about the problem and it's solution?
        Hide
        Marko Mikulicic added a comment -

        Replying to [comment:38 sentimental]:
        > Remote communication is always difficult.
        >
        > It is often the case whereby one finds oneself taking at cross-purposes.
        >
        > So are we now in agreement about the problem and it's solution?

        I was always in agreement on the solution; I was just proposing a quick hack to solve one of the two problems, but a hack is not a solution . But if I were affected by the second issue, I wouldn't mind to have a hack also for it, if there nobody from the Scala maintainers can invest effort in performing a backport and maintenance release. Just a pragmatic approach

        Perhaps we should open a distinct ticket requesting for backporting this fixes to the 2.8.x series ?

        Show
        Marko Mikulicic added a comment - Replying to [comment:38 sentimental] : > Remote communication is always difficult. > > It is often the case whereby one finds oneself taking at cross-purposes. > > So are we now in agreement about the problem and it's solution? I was always in agreement on the solution; I was just proposing a quick hack to solve one of the two problems, but a hack is not a solution . But if I were affected by the second issue, I wouldn't mind to have a hack also for it, if there nobody from the Scala maintainers can invest effort in performing a backport and maintenance release. Just a pragmatic approach Perhaps we should open a distinct ticket requesting for backporting this fixes to the 2.8.x series ?
        Hide
        bryan hunt added a comment -

        Yes, I think that is a very good idea.

        Show
        bryan hunt added a comment - Yes, I think that is a very good idea.
        Hide
        bryan hunt added a comment -

        Request to create a new release with the fix committed in Changeset 24063

        https://lampsvn.epfl.ch/trac/scala/ticket/4259

        Show
        bryan hunt added a comment - Request to create a new release with the fix committed in Changeset 24063 https://lampsvn.epfl.ch/trac/scala/ticket/4259

          People

          • Assignee:
            Martin Odersky
            Reporter:
            AlexK
            TracCC:
            bryan hunt, Daniel Sobral, Erik Engbrecht, Marko Mikulicic, Miles Sabin, Nils, Paul Phillips, Seth Tisue, Simon Ochsenreither
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development