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

void.class is not recognized by groovy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-3
    • 1.0-JSR-4
    • None
    • None
    • jdk 142_09. groovy jsr3, winxp sp 2

    Description

      try this:

      C:\>groovy -e "println(int.class)"
      int
      C:\>groovy -e "println(void.class)"
      script_from_command_line: 1: Unknown type: "void" at line: 1 column: 9. File: script_from_command_line @ line 1, column 9.
      1 Error

      void.class is a valid class in Java, and should be that in groovy, too.

      I know Void class is accessible, but this is not adequate, as void.class and Void.class are different (return false for equals method), just like int.class and Integer.class are different.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            antti.karanta@napa.fi Antti Karanta
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: