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 2021/12/14 20:41:00 UTC

[jira] [Updated] (GROOVY-10414) STC: cannot set non-static outer class property via setter method

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

Eric Milles updated GROOVY-10414:
---------------------------------
    Summary: STC: cannot set non-static outer class property via setter method  (was: STC: cannot set outer class property via setter method)

> STC: cannot set non-static outer class property via setter method
> -----------------------------------------------------------------
>
>                 Key: GROOVY-10414
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10414
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>
> Consider the following:
> {code:groovy}
> @groovy.transform.TypeChecked
> class Outer {
>     class Inner {
>         void test() {
>             setFoo("bar")
>         }
>     }
>     def foo
> }
> {code}
> The compiler emits an error for {{setFoo("bar")}} but {{foo = "bar"}} works just fine.



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