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:51:41 UTC
[jira] [Created] (GROOVY-8079) Literal numeric constants cannot
start with or end with a dot
Tomas Rokicki created GROOVY-8079:
-------------------------------------
Summary: Literal numeric constants cannot start with or end with a dot
Key: GROOVY-8079
URL: https://issues.apache.org/jira/browse/GROOVY-8079
Project: Groovy
Issue Type: Bug
Components: Compiler
Affects Versions: 2.4.8
Environment: Windows, but probably generic
Reporter: Tomas Rokicki
Priority: Minor
Groovy prefers the . (dereference) operator over the decimal interpretation, but does not permit use of decimals that are conventional:
groovy:000> .3
groovysh_parse: 2: unexpected token: . @ line 2, column 1.
.3
^
groovy:000> (.3)
groovysh_parse: 2: unexpected token: . @ line 2, column 2.
(.3)
^
groovy:000> (3.)
groovysh_parse: 2: unexpected token: ) @ line 2, column 4.
(3.)
^
groovy:000> -.3
groovysh_parse: 2: unexpected token: . @ line 2, column 2.
-.3
^
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)