You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Jochen Theodorou (JIRA)" <ji...@apache.org> on 2015/12/06 10:15:10 UTC
[jira] [Resolved] (GROOVY-7693) Error when trying to print negative
number in console
[ https://issues.apache.org/jira/browse/GROOVY-7693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jochen Theodorou resolved GROOVY-7693.
--------------------------------------
Resolution: Won't Fix
Assignee: Jochen Theodorou
I don't think we can fix that really. just think of for example {{foo-bar}}. Is this now supposed to be a method call of the method foo with the expression {{-bar}}, or is that supposed to be variable/property {{foo}} minus variable/property {{bar}}? The expression case gives us more merit, thus you will have to write {{foo(-bar)}} to make it work.
> Error when trying to print negative number in console
> -----------------------------------------------------
>
> Key: GROOVY-7693
> URL: https://issues.apache.org/jira/browse/GROOVY-7693
> Project: Groovy
> Issue Type: Bug
> Components: Groovy Console
> Affects Versions: 2.4.5
> Environment: OS: Mac OS X 10.11 and Debian GNU/Linux Jessie 8.0
> Java: JDK 7u80
> Groovy: 2.4.5
> Reporter: Michael Chen
> Assignee: Jochen Theodorou
> Priority: Minor
>
> $ 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)