mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00

Fixes https://github.com/dlang/dmd/issues/20472 Arrays in C implicitly convert to a pointer to their first member, so do the implicit conversion when using them in an arrow member lookup.
12 lines
195 B
C
12 lines
195 B
C
// https://github.com/dlang/dmd/issues/20472
|
|
typedef struct {
|
|
char c;
|
|
} stuff;
|
|
|
|
char test20472(void)
|
|
{
|
|
stuff s[1];
|
|
s->c = 1;
|
|
return s->c;
|
|
}
|
|
_Static_assert(test20472() == 1, "1");
|