Skip to content

Bindgen fails to detect cyclic types #115

Closed
@kornilova203

Description

@kornilova203
struct b;
struct c;

struct a {
    struct b *bb;
};

struct b {
    struct c *cc;
};

struct c {
    struct a *aa;
};

Produces following Scala code without any warnings:

type struct_b = native.CStruct1[native.Ptr[struct_c]]
type struct_a = native.CStruct1[native.Ptr[struct_b]]
type struct_c = native.CStruct1[native.Ptr[struct_a]]

Problem is in CycleDetection::isCyclic it checks only if a type references itself.

Metadata

Metadata

Assignees

Labels

bindgenBinding generatorbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions