Type error of `ref` types in `OptionEntry`: Invalid type for member `arg_data'
Minimal test:
This doesn't work:
void main (string[] args) {
bool version = false;
OptionEntry[] options = {
{ "version", 'v', OptionFlags.NONE, OptionArg.NONE, ref version, "Display version number", null },
{ null }
};
}
error: Invalid type for member `arg_data'
But declare options
as a const
, or use &version
to replace ref version
works fine.