www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20672] New: Incorrect overloads is compilable with dmd 2.091.0

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

          Issue ID: 20672
           Summary: Incorrect overloads is compilable with dmd 2.091.0
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: kntroh gmail.com

This code is compilable, but is incorrect:

    extern (C) {
        void func(int);
        void func(double, double);
        void func(char[42]);
    }

I think that overloading with extern(C) or extern(Windows) should be prohibited
or warned.
See also: https://github.com/ldc-developers/ldc/issues/3362

--
Mar 13