| 1 |
/* |
| 2 |
Previous implementation raised errors because it was not |
| 3 |
aware of the special treatment for extern(C) member funtions: |
| 4 |
|
| 5 |
Member functions receive D name mangling... |
| 6 |
Some arguments in favour of this inconsistencies |
| 7 |
- static => useful for callbacks |
| 8 |
- non-static => doesn't exists in C anyways |
| 9 |
*/ |
| 10 |
|
| 11 |
extern(C) struct ExternC |
| 12 |
{ |
| 13 |
void foo() {} |
| 14 |
void foo(int) {} |
| 15 |
|
| 16 |
static void bar() {} |
| 17 |
static void bar(int) {} |
| 18 |
} |
| 19 |
|
| 20 |
#line 100 |
| 21 |
void main() |
| 22 |
{ |
| 23 |
ExternC.bar(); |
| 24 |
ExternC.bar(1); |
| 25 |
|
| 26 |
ExternC c; |
| 27 |
c.foo(); |
| 28 |
c.foo(1); |
| 29 |
} |