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

wrong funtion is used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-2
    • 1.0-JSR-3
    • groovy-jdk
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: