fix: new code generator must generate code for opaque declarations that are not `@[extern]` (#6383)

This PR ensures the new code generator produces code for `opaque`
definitions that are not tagged as `@[extern]`.
Remark: This is the behavior of the old code generator.
4 files changed