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

implicit null call allowed for primitive type argument

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.6.4, 1.7-beta-1
    • None
    • None

    Description

      def foo(int i)
      foo()
      

      should fail with a MissingMethodException. We allow the call if foo is taking an Object, but in case of a primitive there is no simple cast from null to a primitive type. For boolean we do not allow that even though null is false in groovy. But since it is an implicit conversion here we decided for now to disallow it.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: