Skip to content

Commit

Permalink
JVM: Add support for call target type being unit (Java's void), fix #…
Browse files Browse the repository at this point in the history
…1902

The code to filter out unit type values was present for the arguments already,
we need this as well for the target that is passed as a first argument and that
may be unit type as well.
  • Loading branch information
fridis committed Sep 22, 2023
1 parent e356626 commit 1c8af70
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/dev/flang/be/jvm/Types.java
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,11 @@ String descriptor(boolean explicitOuter, int cl, boolean pre)
{
var or = _fuir.clazzOuterRef(cl);
var ot = _fuir.clazzResultClazz(or);
as.append(resultType(ot).descriptor());
var at = resultType(ot);
if (at != PrimitiveType.type_void)
{
as.append(at.descriptor());
}
}
for (var ai = 0; ai < _fuir.clazzArgCount(cl); ai++)
{
Expand Down

0 comments on commit 1c8af70

Please sign in to comment.