[ https://issues.apache.org/jira/browse/PYLUCENE-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16030812#comment-16030812 ]
Jesper Mattsson edited comment on PYLUCENE-37 at 5/31/17 8:08 AM: ------------------------------------------------------------------ Certainly, I should have done that when creating the issue - sorry. I attached all the files I used when verifying the bug, but here are the highlights: The Java interface C is defined as: {code} public interface C extends B, A { void c(); } {code} The generated header file for it, C.h, contains (copying only the relevant lines): {code} #include "testjcc/B.h" namespace testjcc { class A; } namespace testjcc { class C : public ::testjcc::B { {code} As you can see, A has a forward declaration, but is not included or inherited. Changing the order of the interfaces in the Java file changes the generated file so that A is included and inherited instead. I'd expect both A.h & B.h to be included, and the first line of the class to be: {code} class C : public ::testjcc::B, public ::testjcc::A { {code} was (Author: jmattsson): Certainly, I should have done that when creating the issue - sorry. I attached all the files I used when verifying the bug, but here are the highlights: The Java interface C is defined as: {code} public interface C extends B, A { void c(); } {code} The generated header file for it, C.h, contains (copying only the relevant lines): {code} #include "testjcc/B.h" namespace testjcc { class A; } namespace testjcc { class C : public ::testjcc::B { {code} As you can see, A has a forward declaration, but is not included or inherited. Changing the order of the interfaces in the Java file changes the generated file so that A is inherited instead. I'd expect both A.h & B.h to be included, and the first line of the class to be: {code} class C : public ::testjcc::B, public ::testjcc::A { {code} > Extended interfaces beyond first are ignored > -------------------------------------------- > > Key: PYLUCENE-37 > URL: https://issues.apache.org/jira/browse/PYLUCENE-37 > Project: PyLucene > Issue Type: Bug > Reporter: Jesper Mattsson > Attachments: Test.zip > > > When generating wrapper for a Java interface that extends more than one other > interface, then only the first extended interface is used when generating the > C++ class. > In cpp.header(), the code snippets: > {code} > if cls.isInterface(): > if interfaces: > superCls = interfaces.pop(0) > {code} > and: > {code} > line(out, indent, 'class %s%s : public %s {', > _dll_export, cppname(names[-1]), absname(cppnames(superNames))) > {code} > are likely responsible. -- This message was sent by Atlassian JIRA (v6.3.15#6346)