Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Panic if asked to generate multi-argument invokes
Presently, Java code generation does not support the `MultiArgumentInputs` field on invokes. When set, this flag instructs the generation of functions that take multiple independent arguments instead of a single object containing all arguments. For example, instead of: ```java Class.function(FunctionArgs.build().setA(a).setB(b).build()); ``` we might generate: ```java Class.function(a, b); ``` Since it is not supported, the correct behaviour is to panic and abort code generation, as we do in other languages with this limitation (e.g. Python). Currently, however, Java does not, proceeding instead to generate incorrect code. This change fixes that, panicking if `MultiArgumentInputs` is true. This is technically breaking, but a bug fix (and in theory, any SDKs we have generated would already be panicking for Python, so the feeling is that this likely not a highly used feature). Fixes #1598
- Loading branch information