Closed starsiderfox closed 2 months ago
A regression introduced by #1382. The way imported types are handled here: https://github.com/nim-works/nimskull/blob/a1decd81b2f34e4c00b92c0182fac3f443244abf/compiler/mir/mirtypes.nim#L1088-L1092
leads to duplicate type mappings being introduced for distinct
or alias types.
Specification
When using
importc
andnodecl
for an object that is just a distinct of another object, the compiler erroneously writes the same struct twice. When I edit the.c
file to remove the duplicate, it works properly.Example
Compile with
--passL:-latomic
Actual Output
Expected Output