If I'm not mistakenly using makeOptional() and I didn't miss something, it seems to me there is no way to emit the closure parameter between () to be able to mark it as optional using ? and the issue is in ParameterizedTypeName which always emits "%T?" without taking care of the parenthesis.
Hello there,
I want to use generate the following function where the
closure
parameter is optional:I tried it modifying a bit the already existent test in
FunctionSpecTests
usingmakeOptional()
,but what I get is
Furthermore, I tried also wanting the
STRING
return type as optional, so I changed the code toand what I get is
If I'm not mistakenly using
makeOptional()
and I didn't miss something, it seems to me there is no way to emit the closure parameter between()
to be able to mark it as optional using?
and the issue is inParameterizedTypeName
which always emits"%T?"
without taking care of the parenthesis.Could you check my PR for a solution proposal?