Is this code valid in Djinni, and some_record
can be generated for objective c?
some_service = interface +c
{
do_some_action(): bool;
}
some_record = record
{
service: optional< some_service >;
}
Is this code valid in Djinni, and some_record
can be generated for objective c?
some_service = interface +c
{
do_some_action(): bool;
}
some_record = record
{
service: optional< some_service >;
}
It seems simple and valid to me (though without trying it I'm not confident there's not a gotcha case I'm missing.
Note that optional interfaces are pretty meaningless in Djinni unless you're also using non-nullable pointer support (see the cpp-nn-* arguments). Those depend on using a non-nullable template in C++ such as nn<> Without that, interfaces are all nullable by default anyway. With nn enabled, interfaces are non-nullable by default, and optional ends up as the nullable version.