You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Howard (Jira)" <ji...@apache.org> on 2020/12/15 19:00:07 UTC

[jira] [Updated] (GROOVY-9859) Groovy3 doesn't parse a function property when there's a new line between return value and function name

     [ https://issues.apache.org/jira/browse/GROOVY-9859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard updated GROOVY-9859:
---------------------------
    Description: 
The follow code compiles fine on groovy 2, but fails on groovy 3
{code}
public synchronized ImmutableMap<String,Pair<String,Double>> 
a(
         List<String> params,
         List<String> columnMapping)
     {
return null;
}

public class Pair<T, U> {}
public class ImmutableMap<T, U> {}
{code}

error msg
{code}

 
1 compilation error:

Unexpected input: 'public synchronized ImmutableMap<String,Pair<String,Double>> \n' at line: 1, column: 62
{code}

  was:
The follow code compiles fine on groovy 2, but fails on groovy 3
{code}
public synchronized ImmutableMap<String,Pair<String,Double>> 
a(
         List<String> params,
         List<String> columnMapping)
     {
}

public class Pair<T, U> {}
public class ImmutableMap<T, U> {}
{code}

error msg
{code}

 
1 compilation error:

Unexpected input: 'public synchronized ImmutableMap<String,Pair<String,Double>> \n' at line: 1, column: 62
{code}


> Groovy3 doesn't parse a function property when there's a new line between return value and function name
> --------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-9859
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9859
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Howard
>            Priority: Major
>
> The follow code compiles fine on groovy 2, but fails on groovy 3
> {code}
> public synchronized ImmutableMap<String,Pair<String,Double>> 
> a(
>          List<String> params,
>          List<String> columnMapping)
>      {
> return null;
> }
> public class Pair<T, U> {}
> public class ImmutableMap<T, U> {}
> {code}
> error msg
> {code}
>  
> 1 compilation error:
> Unexpected input: 'public synchronized ImmutableMap<String,Pair<String,Double>> \n' at line: 1, column: 62
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)