Christopher Smith created GROOVY-10941:
------------------------------------------

             Summary: Parrot should allow newline after type witness
                 Key: GROOVY-10941
                 URL: https://issues.apache.org/jira/browse/GROOVY-10941
             Project: Groovy
          Issue Type: Improvement
          Components: parser-antlr4
    Affects Versions: 4.0.9
            Reporter: Christopher Smith


In functional pipelines, type witnesses are sometimes required when the 
generics code can't solve a suitable bound. Since these can get wordy, it often 
improves readability to put a newline between the witness and the method call. 
Currently, Parrot reports an error in this case.

{code:groovy}
Optional.<Number>
  of(42)
{code}

An explicit {{\}} before the newline prevents the error but shouldn't be 
necessary.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to