You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniil Ovchinnikov (Jira)" <ji...@apache.org> on 2019/12/04 13:14:00 UTC

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

Daniil Ovchinnikov created GROOVY-9328:
------------------------------------------

             Summary: Cannot call private method 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


{code:java}
class C {

    private privateMethod() {}

    def anonymousUsage() {
        new Runnable() {
            @groovy.transform.CompileStatic
            @Override
            void run() {
                privateMethod()
            }
        }
    }
} {code}
Expected: code is compiled without errors.
Actual: {{Cannot call private method C#privateMethod from class C$1}}



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