You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Tomas Rokicki (JIRA)" <ji...@apache.org> on 2017/02/07 19:48:41 UTC

[jira] [Created] (GROOVY-8078) Double unary - and + not supported ?

Tomas Rokicki created GROOVY-8078:
-------------------------------------

             Summary: Double unary - and + not supported ?
                 Key: GROOVY-8078
                 URL: https://issues.apache.org/jira/browse/GROOVY-8078
             Project: Groovy
          Issue Type: Bug
          Components: Compiler
    Affects Versions: 2.4.8
         Environment: Windows (but probably generic)
            Reporter: Tomas Rokicki
            Priority: Minor


You cannot use a double unary - or +, or combine them:

groovy:000> - - 3
groovysh_parse: 2: unexpected token: - @ line 2, column 3.
   - - 3
     ^

groovy:000> - + 3
groovysh_parse: 2: unexpected token: + @ line 2, column 3.
   - + 3
     ^

groovy:000> - -3
groovysh_parse: 2: unexpected token: - @ line 2, column 3.
   - -3
     ^

groovy:000> + + 3
groovysh_parse: 2: unexpected token: + @ line 2, column 3.
   + + 3

This is just an annoyance, or perhaps it is intentional.




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)