- /* we must have exactly one ret stmt delcaring the native func to call */
- /* and which type cast to apply */
- if (impl->stmts->ret.count != 1) {
- if (impl->stmts->ret.count > 1) {
- data->error(data, impl->stmts->ret.list[1]->token, PSI_WARNING,
- "Too many `return` statements for implmentation %s;"
- " found %zu, exactly one is needed",
- impl->func->name, impl->stmts->ret.count);
- } else {
- data->error(data, impl->func->token, PSI_WARNING,
- "Missing `return` statement for implementation %s",
- impl->func->name);
- }
- return 0;
- }