Skip to content

Enums cause the tool to create invlaid C# code #251

@Timo-Weike

Description

@Timo-Weike

If I have the c types

typedef enum myEnum {
	One,
	Two
} enum_t;

typedef struct {
	enum_t enumField;
} Test1;

the tool generates C# code like

public enum myEnum
{
	One,
	Two,
}

public partial struct Test1
{
	[NativeTypeName("enum_t")]
	public enum myEnum enumField;
}

which is incorrect.

In contrast, if I drop the myEnum from the typedef the tool generates the correct C# code.

PS: It is the same for typedef struct name { ... } otherName;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions