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 2019/02/19 16:46:00 UTC
[jira] [Resolved] (GROOVY-8991) Difference in behaviour with
closure and lambda
[ https://issues.apache.org/jira/browse/GROOVY-8991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Sun resolved GROOVY-8991.
--------------------------------
Resolution: Fixed
Fixed by https://github.com/apache/groovy/commit/66a9883a9ac6ecf28353e013a5777f82e1e33d84
> Difference in behaviour with closure and lambda
> -----------------------------------------------
>
> Key: GROOVY-8991
> URL: https://issues.apache.org/jira/browse/GROOVY-8991
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Affects Versions: 3.0.0-alpha-4
> Reporter: Alexey Afanasiev
> Assignee: Daniel Sun
> Priority: Major
> Fix For: 3.0.0-alpha-5
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> {code}
> foo {
> closure
> }
> .bar {
> closure2
> }
> //produced binary like
> this.foo({
> return closure
> }).bar({
> return closure2
> })
> {code}
> but
> {code}
> foo ()->{
> closure
> }
> .bar ()->{
> closure2
> }
> //produced binary like
> this.foo({
> return closure
> }.bar).{
> return closure2
> }
> {code}
> I believe this difference is quite unexpected.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)