PREFERRED PARAMETER is ignored
preferred_parameter_ignored
Description
PREFERRED PARAMETER on an IMPORTING clause that still has a mandatory parameter. The addition names the parameter a positional call fills, which only means something when every parameter may be left out - so with a mandatory one present it does nothing.
Extended Information
`PREFERRED PARAMETER` names the importing parameter that a call filling exactly
one parameter positionally fills. That question only arises when a parameter
may be LEFT OUT, so the addition is ignored while any importing parameter is
neither `OPTIONAL` nor carries a `DEFAULT`.
The compiler warns "Declare the parameter as OPTIONAL. The addition PREFERRED
PARAMETER is ignored if non-optional parameters are used", yet it still lets a
call leave the preferred parameter out. So the quick fix declares the mandatory
importing parameters OPTIONAL, as the compiler asks: every call that compiles
today keeps compiling. Removing the addition instead would turn the calls that
leave the preferred parameter out into syntax errors.