jw
09/30/2021, 12:47 PMtypedef struct Foo Foo; winds up as cnames.structs.Foo whereas typedef struct Foo { ... } Foo; goes into my.package.Foo? I'm running into simple name collisions in cnames.structs which are causing compilation failures only on some native targets.sergey.bogolepov
10/01/2021, 4:52 AMcnames.structs is used to support forward declarations in Kotlin. More precisely, to support cases like "forward declaration (typedef struct Foo Foo;) gets into module A, and an actual declaration (typedef struct Foo { ... } Foo;) gets into module B". If both modules get into the compiler, then compiler magically resolves references to cnames.structs.Foo to B.Foo.
Could you share a reproducer?sergey.bogolepov
10/01/2021, 7:43 AMsergey.bogolepov
10/01/2021, 8:19 AM---
typedef struct Foo {} Foo;
It will force cinterop to use my.package.Foo instead of cnames.structs.Foo. Does it work for you?msink
10/01/2021, 9:19 AMmsink
10/01/2021, 9:20 AMmsink
10/01/2021, 10:45 AMjw
10/01/2021, 4:59 PMDoes it work for you?Yes. Thanks! This is much better.