[Issue 18385] New: [REG nightly] function cannot be overloaded with another extern(C) function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 6 16:08:00 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18385
Issue ID: 18385
Summary: [REG nightly] function cannot be overloaded with
another extern(C) function
Product: D
Version: D2
Hardware: x86
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: doob at me.com
The following code compiles with latest DMD 2.078.1, but fails with DMD nightly
v2.078.2-beta.1-651-gc55c9be60.
extern (C):
void foo(int) { }
void foo(double) { }
Note that global C function will not have a mangling, but methods of a struct
or class declared as `extern (C)` will get mangled as a D method. This can be
used as a callback function for a C function.
--
More information about the Digitalmars-d-bugs
mailing list