| 1 |
// https://issues.dlang.org/show_bug.cgi?id=23778 |
| 2 |
|
| 3 |
|
| 4 |
enum __c_long_double : double; |
| 5 |
|
| 6 |
alias __c_long_double c_long_double; |
| 7 |
|
| 8 |
struct _Complex |
| 9 |
{ |
| 10 |
c_long_double re; |
| 11 |
c_long_double im; |
| 12 |
} |
| 13 |
|
| 14 |
version (all) // bug to test |
| 15 |
{ |
| 16 |
enum __c_complex_real : _Complex; |
| 17 |
alias c_complex_real = __c_complex_real; |
| 18 |
} |
| 19 |
else // works |
| 20 |
enum c_complex_real : _Complex; |
| 21 |
|
| 22 |
c_complex_real toNative2(real re, real im) |
| 23 |
{ |
| 24 |
return c_complex_real(re, im); |
| 25 |
} |
| 26 |
|
| 27 |
void main() |
| 28 |
{ |
| 29 |
c_complex_real n = toNative2(123, 456); |
| 30 |
assert(123 == n.re && 456 == n.im); |
| 31 |
} |