[Issue 24280] ImportC: forward reference error when compiling multiple files

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 12 23:04:37 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=24280

--- Comment #1 from Dennis <dkorpel at live.nl> ---
Another example: (not sure if it's the same bug)

a.c
```C
typedef struct {} Slice;
struct Lang
{
    Slice *slices;
};
```

b.c
```C
typedef struct {} Slice;

struct Lang
{
    Slice *slices;
};

void langmap(struct Lang *self)
{
    Slice slice = *self->slices;
}
```

```
dmd a.c // works
dmd b.c // works
dmd b.c a.c // works
dmd a.c b.c // fails:
b.c(11): Error: cannot implicitly convert expression `*(*self).slices` of type
`__tag2` to `__tag3`
```

--


More information about the Digitalmars-d-bugs mailing list