You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Jasmin Patel (JIRA)" <ji...@apache.org> on 2017/05/12 08:50:04 UTC
[jira] [Updated] (GROOVY-8187) Closure MissingPropertyException
[ https://issues.apache.org/jira/browse/GROOVY-8187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jasmin Patel updated GROOVY-8187:
---------------------------------
Description:
{code:none}
return (1..1000)
.any(
{
final it ->
it % 2000 == 2000
})
{code}
{code:none}
println(
(1..1000)
.any
{
final it ->
it % 2000 == 2000
}
)
{code}
{code:none}
return (1..1000)
.any
{
final it ->
it % 2000 == 2000
}
{code}
First snippet works, so does second. Third one causes the following exception:
groovy.lang.MissingPropertyException: Exception evaluating property 'any' for groovy.lang.IntRange, Reason: groovy.lang.MissingPropertyException: No such property: any for class: java.lang.Integer
was:
{code:groovyl}
return (1..1000)
.any(
{
final it ->
it % 2000 == 2000
})
{code}
{code:groovyl}
println(
(1..1000)
.any
{
final it ->
it % 2000 == 2000
}
)
{code}
{code:groovyl}
return (1..1000)
.any
{
final it ->
it % 2000 == 2000
}
{code}
First snippet works, so does second. Third one causes the following exception:
groovy.lang.MissingPropertyException: Exception evaluating property 'any' for groovy.lang.IntRange, Reason: groovy.lang.MissingPropertyException: No such property: any for class: java.lang.Integer
> Closure MissingPropertyException
> --------------------------------
>
> Key: GROOVY-8187
> URL: https://issues.apache.org/jira/browse/GROOVY-8187
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 2.4.11
> Environment: Distributor ID: Ubuntu
> Description: Ubuntu 16.04.2 LTS
> Release: 16.04
> Codename: xenial
> Groovy Version: 2.4.11 JVM: 1.8.0_121 Vendor: Oracle Corporation OS: Linux
> Reporter: Jasmin Patel
> Priority: Minor
> Attachments: Test.groovy
>
>
> {code:none}
> return (1..1000)
> .any(
> {
> final it ->
> it % 2000 == 2000
> })
> {code}
> {code:none}
> println(
> (1..1000)
> .any
> {
> final it ->
> it % 2000 == 2000
> }
> )
> {code}
> {code:none}
> return (1..1000)
> .any
> {
> final it ->
> it % 2000 == 2000
> }
> {code}
> First snippet works, so does second. Third one causes the following exception:
> groovy.lang.MissingPropertyException: Exception evaluating property 'any' for groovy.lang.IntRange, Reason: groovy.lang.MissingPropertyException: No such property: any for class: java.lang.Integer
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)