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

Unexpected "recursive value needs type" error

    Details

      Description

      With scala-2.10.0.r25850-b20111019023417, compiling:

      RecursiveValueNeedsType.scala
      object RecursiveValueNeedsType {
      
        def foo(param: String) = 42
        def bar(n: Int) = 42
      
        {
          val xxx = foo(param = null)
          val param = bar(xxx)
        }
        
      }
      

      Gives the error:

      RecursiveValueNeedsType.scala:8: error: recursive value xxx needs type
          val param = bar(xxx)
      

        Issue Links

          Activity

          Show
          Freewind added a comment - An example: http://stackoverflow.com/questions/9148339/why-this-scala-code-reports-compilation-error-recursive-value-x-needs-type
          Hide
          Lukas Rytz added a comment - - edited

          very similar symptom in SI-6051

          Show
          Lukas Rytz added a comment - - edited very similar symptom in SI-6051
          Hide
          James Iry added a comment -

          2.10.2 is about to be cut. Kicking down the road and un-assigning to foster work stealing.

          Show
          James Iry added a comment - 2.10.2 is about to be cut. Kicking down the road and un-assigning to foster work stealing.

            People

            • Assignee:
              Unassigned
              Reporter:
              Matt Russell
            • Votes:
              7 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated:

                Development