Skip to content

Commit 7dc2afa

Browse files
committed
Merge branch 'issue-72'
2 parents 9c69511 + 1aad38b commit 7dc2afa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tlbimp/src/main/java/com4j/tlbimp/MethodBinder.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,9 +551,10 @@ protected final void declareReturnType(IndentingWriter o, List<IType> intermedia
551551
TypeBinding retBinding = TypeBinding.bind(g, returnType, null);
552552

553553
// add @ReturnValue if necessary
554-
if ((!retBinding.isDefault && needsMarshalAs()) || (retParam != -1 && (params[retParam].isIn() || retParam != params.length - 1))
555-
|| intermediates != null
556-
|| usesDefaltValues) {
554+
if (((!retBinding.isDefault && needsMarshalAs()) || (retParam != -1 && (params[retParam].isIn() || retParam != params.length - 1))
555+
|| intermediates != null
556+
|| usesDefaltValues)
557+
&& !retBinding.javaType.equals("void")) {
557558
o.print("@ReturnValue(");
558559
o.beginCommaMode();
559560
if (!retBinding.isDefault && needsMarshalAs()) {

0 commit comments

Comments
 (0)