Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7193

Recursive calls cause unnecessary call site generation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.4.0-rc-1
    • groovy-runtime
    • None

    Description

      In a recursive function like:

      def fib(n) {
        n<=2L?n:fib(n-1L)+fib(n-2L)
      }
      

      When the `+` operation is called, an old call site is used, triggering an unnecessary call site generation.

      Attachments

        Activity

          People

            melix Cédric Champeau
            melix Cédric Champeau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: