On Tue, 20 Jun 2023 22:59:42 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/foreign/Linker.java line 650: >> >>> 648: * function descriptor associated with a downcall >>> linkage request} >>> 649: * <p> >>> 650: * The {@code index} value must be greater than zero, and less >>> than or equal to the number of argument layouts >> >> Why > 0 and not >= 0? If the list of argument layout is empty, wouldn't the >> first vararg be in position 0? E.g. a call to a function `m(...)` with _no_ >> actual arguments? > > E.g. are we making an assumption here that if no arguments are passed, then > the calling sequence won't be affected by variadic-ness - is that assumption > always true? Ah, sorry, this is just a mistake I made. It should be >= 0 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14565#discussion_r1236015716