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

Eric Milles resolved GROOVY-11372.
----------------------------------
    Resolution: Fixed

> STC: write property via extension method
> ----------------------------------------
>
>                 Key: GROOVY-11372
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11372
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>    Affects Versions: 3.0.21, 5.0.0-alpha-8, 4.0.21
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 3.0.22, 5.0.0-alpha-9, 4.0.22
>
>
> Consider the following:
> {code:groovy}
> @groovy.transform.TypeChecked
> void test(OutputStream os) {
>   os.bytes = new byte[0]
> }
> {code}
> Compiler reports "No such property: bytes for class: java.io.OutputStream".  
> This is because {{StaticTypeCheckingVisitor#existsProperty}} looks for 
> isser/getter to determine property type.  This only works for matched methods 
> like "MetaClass getMetaClass()" and "void setMetaClass(MetaClass mc)".
> GROOVY-9115, GROOVY-9123, GROOVY-11370



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to