You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * Parses command-line arguments * * @param [in] args * @param [out] res_args * * @return! CommandArgsErr.INVALID_SRC_FILE * @return! CommandArgsErr.INVALID_OUT_FILE * @return! CommandArgsErr.TOO_FEW_ARGUMENTS*/
fn void! parseCommandArgs(String[] args, CommandArgs* res_args)
{
if (args.len == 1) {
hlp::printFuncErrN("Too few arguments");
return CommandArgsErr.TOO_FEW_ARGUMENTS?;
}
for (usz i = 0; i < args.len; ++i) {
parseFlagSource(args, i, &res_args.src_path);
}
}
Here, I want @return! to be declared multiple times to avoid too long line with the amount of possible excuses.
This code is actually compiled but if I swap @return! blocks by moving TOO_FEW_ARGUMENTS on top:
49: {
50: if (args.len == 1) {
51: hlp::printFuncErrN("Too few arguments");
52: return CommandArgsErr.TOO_FEW_ARGUMENTS?;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(/home/starleks/coding/c3-binder/src/helpers/command-args.c3:52:12) Error: This value does not match declared optional returns, it needs to be declared with the other optional returns.
So I propose to write multiple @return! statements in docs instead of writing @return! EXCUSE_1, EXCUSE_2, EXCUSE_3.
The text was updated successfully, but these errors were encountered:
For example, I have such code
Here, I want
@return!
to be declared multiple times to avoid too long line with the amount of possible excuses.This code is actually compiled but if I swap
@return!
blocks by movingTOO_FEW_ARGUMENTS
on top:I get an error:
So I propose to write multiple
@return!
statements in docs instead of writing@return! EXCUSE_1, EXCUSE_2, EXCUSE_3
.The text was updated successfully, but these errors were encountered: