You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (JIRA)" <ji...@apache.org> on 2018/05/25 11:16:00 UTC
[jira] [Comment Edited] (GROOVY-8606) Provide friendly error
message for invalid lambda body
[ https://issues.apache.org/jira/browse/GROOVY-8606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16490547#comment-16490547 ]
Daniel Sun edited comment on GROOVY-8606 at 5/25/18 11:15 AM:
--------------------------------------------------------------
Current solution breaks other tests, it is reverted for the time being
[https://github.com/apache/groovy/commit/1bd642488104ca8204bd45c1c1cf4d304d7d564f]
was (Author: daniel_sun):
Fixed by https://github.com/apache/groovy/commit/1bd642488104ca8204bd45c1c1cf4d304d7d564f
> Provide friendly error message for invalid lambda body
> ------------------------------------------------------
>
> Key: GROOVY-8606
> URL: https://issues.apache.org/jira/browse/GROOVY-8606
> Project: Groovy
> Issue Type: Improvement
> Components: parser-antlr4
> Reporter: Daniel Sun
> Assignee: Daniel Sun
> Priority: Major
> Fix For: 2.6.0-alpha-4, 3.0.0-alpha-3
>
>
> We should provide friendly error message like "Statements should be wrapped in a block, e.g. () -> { some statements here }", e.g.
> Script1.groovy: 1: Statements should be wrapped in a block, e.g. () -> { some statements here } @ line 1, column 15.
> def a = () -> assert 1 == 1
> ^
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)