Details

      Description

      the following file is crashing the compiler:
      ----------------------------------------------
      https://github.com/playframework/Play20/blob/master/framework/src/play/src/main/scala/play/api/libs/json/Util.scala

      stack trace:
      -----------
      [elided]

      I deleted the stack trace because it's all spurious; the only relevant information is "OutOfMemoryError".

        Activity

        Hide
        Paul Phillips added a comment -

        Something has gone exponential in type inference.

        Show
        Paul Phillips added a comment - Something has gone exponential in type inference.
        Hide
        Paul Phillips added a comment -

        The exponent is applied during type parameter inference. If you wish to work around:

        // All the expressions which look like this
        def ~[A21](m3:M[A21]) = new CanBuild21(canBuild(m1,m2),m3)
        // Should instead be generated like this
        def ~[A21](m3:M[A21]) = new CanBuild21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21](canBuild(m1,m2),m3)
        

        Then the problem will go away.

        Show
        Paul Phillips added a comment - The exponent is applied during type parameter inference. If you wish to work around: // All the expressions which look like this def ~[A21](m3:M[A21]) = new CanBuild21(canBuild(m1,m2),m3) // Should instead be generated like this def ~[A21](m3:M[A21]) = new CanBuild21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21](canBuild(m1,m2),m3) Then the problem will go away.
        Show
        Paul Phillips added a comment - https://github.com/scala/scala/pull/1294

          People

          • Assignee:
            Paul Phillips
            Reporter:
            peter hausel
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development