ClangSharp
ClangSharp copied to clipboard
Generating a transparent struct of a boolean byte generates C# code with a missing parenthesis
Description:
Generating a byte boolean with --with-transparent-struct MyBoolean=byte;Boolean generates a helper struct with a line with a missing parenthesis.
Minimal reproduction:
repro.h
#include <stdint.h>
typedef uint8_t MyBoolean;
typedef MyBoolean (*MyFunction)(void* userdata);
repro.rsp
--file
repro.h
--output
./
--namespace
Repro
--config
multi-file
preview-codegen
exclude-fnptr-codegen
generate-helper-types
--with-transparent-struct
MyBoolean=byte;Boolean
Output:
public static implicit operator MyBoolean(bool value) => new MyBoolean((byte)(value ? 1u : 0u);