[ 
https://issues.apache.org/jira/browse/GROOVY-7930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15511731#comment-15511731
 ] 

ASF GitHub Bot commented on GROOVY-7930:
----------------------------------------

GitHub user paulk-asert opened a pull request:

    https://github.com/apache/groovy/pull/428

    GROOVY-7930: @SelfType in hierarchy with an interface in the middle

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/paulk-asert/groovy groovy7930

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/428.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #428
    
----
commit cd8eac239b79b3387ab223f68e0853cf55f0cc55
Author: paulk <pa...@asert.com.au>
Date:   2016-09-22T01:10:54Z

    GROOVY-7930: @SelfType in hierarchy with an interface in the middle

----


> @SelfType in hierarchy with an interface in the middle
> ------------------------------------------------------
>
>                 Key: GROOVY-7930
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7930
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 2.4.7
>            Reporter: Daniil Ovchinnikov
>
> {code}
> interface Self {
>     def bar()
> }
> @SelfType(Self)
> trait T {
>     def foo() {
>         println "foo called"
>         bar()
>     }
> }
> interface Middle extends T {}
> class C implements Middle {}
> new C().foo()
> {code}
> Above code compiles fine but fails at run time with:
> {noformat}
> groovy.lang.MissingMethodException: No signature of method: 
> selftype.baseinterface.C.bar() is applicable for argument types: () values: []
> {noformat}
> The compilation should fail like if {{Middle}} was a trait.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to