[jira] [Updated] (GROOVY-9328) Cannot call private member of containing class in @CS

2022-02-24 Thread Eric Milles (Jira)


 [ 
https://issues.apache.org/jira/browse/GROOVY-9328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Milles updated GROOVY-9328:

Fix Version/s: 2.5.16

> Cannot call private member of containing class in @CS
> -
>
> Key: GROOVY-9328
> URL: https://issues.apache.org/jira/browse/GROOVY-9328
> Project: Groovy
>  Issue Type: Bug
>  Components: Static Type Checker
>Affects Versions: 2.5.8
>Reporter: Daniil Ovchinnikov
>Assignee: Eric Milles
>Priority: Major
> Fix For: 3.0.0-rc-3, 2.5.16
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> {code:java}
> class C {
> private C() {}
> private privateMethod() {}
> def anonymousUsage() {
> new Runnable() {
> @groovy.transform.CompileStatic
> @Override
> void run() {
> privateMethod()
> new C()
> }
> }
> }
> }{code}
> Expected: code is compiled without errors.
>  Actual: 2  errors:
> {{Cannot call private method C#privateMethod from class C$1}}
> {{Cannot call private constructor for C from class C$1}}
> Note that Java compiles the same code just fine.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Updated] (GROOVY-9328) Cannot call private member of containing class in @CS

2019-12-04 Thread Daniil Ovchinnikov (Jira)


 [ 
https://issues.apache.org/jira/browse/GROOVY-9328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniil Ovchinnikov updated GROOVY-9328:
---
Summary: Cannot call private member of containing class in @CS  (was: 
Cannot call private method of containing class in @CS)

> Cannot call private member of containing class in @CS
> -
>
> Key: GROOVY-9328
> URL: https://issues.apache.org/jira/browse/GROOVY-9328
> Project: Groovy
>  Issue Type: Bug
>  Components: Static Type Checker
>Affects Versions: 2.5.8
>Reporter: Daniil Ovchinnikov
>Priority: Major
>
> {code:java}
> class C {
> private C() {}
> private privateMethod() {}
> def anonymousUsage() {
> new Runnable() {
> @groovy.transform.CompileStatic
> @Override
> void run() {
> privateMethod()
> new C()
> }
> }
> }
> }{code}
> Expected: code is compiled without errors.
>  Actual: 2  errors:
> {{Cannot call private method C#privateMethod from class C$1}}
> {{Cannot call private constructor for C from class C$1}}
> Note that Java compiles the same code just fine.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)