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

wrong funtion is used

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-JSR-2
    • Fix Version/s: 1.0-JSR-3
    • Component/s: groovy-jdk
    • Labels:
      None

      Description

      def func( test )
      {
      if( test )

      { return "hello" }

      else

      { return "goodbye" }

      }
      println func(true)
      println func(false)

      println func();

      //output
      hello
      goodbye
      goodbye

      //expected
      I expecte an exception is thrown in statement "println func()" for no such function existed

        Attachments

          Activity

            People

            • Assignee:
              blackdrag Jochen Theodorou
              Reporter:
              wangbin wangbin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: