If there is an out optionalclass value, the code generator creates a base result variable:
IBase * pBaseHandlerInstance(nullptr);
This leads to a compile error of the implementation. The class should be the correct output class, like
ISignalHandler * pBaseHandlerInstance(nullptr);