[
https://issues.apache.org/jira/browse/PYLUCENE-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17085999#comment-17085999
]
Andreas Vajda commented on PYLUCENE-53:
---------------------------------------
Yes, in fact I worked on this yesterday. I'm still battling with this issue and
with C++ multiple inheritance. The only way to avoid the dreaded diamond
inheritance problems is to use virtual base classes. I've got the code
generator producing valid-looking C++ code and the compiler building and
linking it but the code instantly crashes somewhere in init.
I'm hoping that I can find a solution for this crash or a completely different
approach that would *not* require multiple inheritance at all (soooo much
simpler) but I have nothing concrete to report at the moment.
A casting approach to "force" visibility of an interface's methods, verifying
with the Java VM that the case is valid, could be made to work but that would
not be transparent. I may have to resort to that if all else fails.
> JCC Default implementations from Interfaces not exposed
> -------------------------------------------------------
>
> Key: PYLUCENE-53
> URL: https://issues.apache.org/jira/browse/PYLUCENE-53
> Project: PyLucene
> Issue Type: Bug
> Reporter: Petrus Hyvönen
> Priority: Major
> Attachments: Test_default_implementation.zip
>
>
> Hi,
> This may be related to PYLUCENE-27 but not sure.
> Default implementations of methods in an interface does not seem to be
> exposed currently.
> For example:
> The interface:
> interface Being {
> public void printName();
> default int getFeets()
> {
> return 4;
> }
> }
> Implemented in the class:
> public class Cat extends Feline implements Being {
> public void printName() {
> System.out.println("Cat");
> }
> public int getJavaFeets()
> {
> return this.getFeets();
> }
> }
> When wrapped in Python, the getJavaFeets is exposed to the Python side, but
> not the getFeets method.
>
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)