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 2019/08/22 04:11:00 UTC
[jira] [Updated] (GROOVY-3805) Boolean coercion for closures
[ https://issues.apache.org/jira/browse/GROOVY-3805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King updated GROOVY-3805:
------------------------------
Summary: Boolean coercion for closures (was: Booean coercion for closures)
> Boolean coercion for closures
> -----------------------------
>
> Key: GROOVY-3805
> URL: https://issues.apache.org/jira/browse/GROOVY-3805
> Project: Groovy
> Issue Type: New Feature
> Reporter: Guillaume Delcroix
> Assignee: Guillaume Delcroix
> Priority: Major
> Fix For: 1.7-beta-2
>
>
> Add the ability to coerce closures to boolean expressions.
> A zero or one-parameter closures can be coerced to a boolean expression when called with c(), and the result of this call is coerced to boolean.
> If the closure takes more than one parameter, the coercion should fail with an explicit exception to avoid any confusion.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)