You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2022/07/04 02:35:00 UTC
[jira] [Closed] (GROOVY-8079) Literal numeric constants cannot start with or end with a dot
[ https://issues.apache.org/jira/browse/GROOVY-8079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-8079.
-----------------------------
Assignee: Paul King
Resolution: Duplicate
We likely won't change the trailing case, so I'll close this for now.
> 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
> Assignee: Paul King
> 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
(v8.20.10#820010)