polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niclas Hedhman (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (POLYGENE-251) Support Java 8 default methods on interfaces
Date Mon, 15 May 2017 09:47:04 GMT

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

Niclas Hedhman commented on POLYGENE-251:
-----------------------------------------

I have created a InterfaceDefaultMethodsMixin which handles the MethodHandle stuff back to
the default method in the interface. 

I am now at a point where the SideEffect seems to work, but Concerns don't. At first because
the SideEffect implemented the interface WITH the @SideEffects declaration, whereas the Concern
implemented the superinterface, and the two sayHello() default methods are not type assignable
with each other (not sure if that is a JVM bug or not).

But after putting the implementation same between the SideEffects testcase and the Concerns
testcase, I now get a much worse error, that the MethodHandle can't do its magic.

It is really strange.

> Support Java 8 default methods on interfaces
> --------------------------------------------
>
>                 Key: POLYGENE-251
>                 URL: https://issues.apache.org/jira/browse/POLYGENE-251
>             Project: Polygene
>          Issue Type: Bug
>            Reporter: Paul Merlin
>            Assignee: Niclas Hedhman
>            Priority: Blocker
>             Fix For: 3.0
>
>
> The following composite declaration:
> {code}
> public interface DefaultMethods
> {
>     default String sayHello( String name )
>     {
>         return "Hello, " + name + '!';
>     }
> }
> {code}
> fails at assembly with:
> {code}
> Composition Problems Report:
>     message: No implementation found for method 
>     method: String sayHello(String name)
> {code}
> See {{InterfaceDefaultMethodsTest}} in {{core/runtime}}
> Also see POLYGENE-120 for some preliminary investigation.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message