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

Error when trying to print negative number in console

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.4.5
    • Fix Version/s: None
    • Component/s: Groovy Console
    • Labels:
      None
    • Environment:
      OS: Mac OS X 10.11 and Debian GNU/Linux Jessie 8.0
      Java: JDK 7u80
      Groovy: 2.4.5

      Description

      $ groovy -e 'println -3'
      Caught: groovy.lang.MissingPropertyException: No such property: println for class: script_from_command_line
      groovy.lang.MissingPropertyException: No such property: println for class: script_from_command_line
      at script_from_command_line.run(script_from_command_line:1)

      $ groovy -e 'println (-3)'
      -3

      This error occurred when written either in script file or on-the-fly.

        Attachments

          Activity

            People

            • Assignee:
              blackdrag Jochen Theodorou
              Reporter:
              cwchentw Michael Chen
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: