You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (JIRA)" <ji...@apache.org> on 2019/07/23 18:03:00 UTC
[jira] [Updated] (GROOVY-9203) Anonymous inner class count is not
local to enclosing type
[ https://issues.apache.org/jira/browse/GROOVY-9203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-9203:
--------------------------------
Description:
Consider the following:
{code}
class C {
def meth() {
new Object() {} // C$1
new Object() {} // C$2
new Object() { // C$3
String toString() {
new Object() {} // C$3$4 but expect C$3$1
}
}
// new Object() {} here would be C$5 but expect C$4
}
}
println new C().meth()
{code}
was:
Consider the following:
{code}
class C {
def meth() {
new Object() {} // C$1
new Object() {} // C$2
new Object() { // C$3
String toString() {
new Object() {} // C$3$4 but expect C$3$1
}
}
}
}
println new C().meth()
{code}
> Anonymous inner class count is not local to enclosing type
> ----------------------------------------------------------
>
> Key: GROOVY-9203
> URL: https://issues.apache.org/jira/browse/GROOVY-9203
> Project: Groovy
> Issue Type: Bug
> Reporter: Eric Milles
> Priority: Major
>
> Consider the following:
> {code}
> class C {
> def meth() {
> new Object() {} // C$1
> new Object() {} // C$2
> new Object() { // C$3
> String toString() {
> new Object() {} // C$3$4 but expect C$3$1
> }
> }
> // new Object() {} here would be C$5 but expect C$4
> }
> }
> println new C().meth()
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)