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

Eric Milles updated GROOVY-8243:
--------------------------------
    Labels: trait traits  (was: )

> SAM trait coercion via middle interface
> ---------------------------------------
>
>                 Key: GROOVY-8243
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8243
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.10
>            Reporter: Daniil Ovchinnikov
>            Priority: Major
>              Labels: trait, traits
>
> {code}
> trait T {
>     abstract def foo(int i)
>     def bar(double j) {
>         println "bar $j"
>     }
> }
> interface F extends T {}
> F t = { println "closure $it" }
> t.foo(42) // `closure 42`
> t.bar(43) // `closure 43.0`; should be `bar 43.0`
> {code}
> Changing variable type to {{T}} works as expected.



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

Reply via email to