How can overloads be distinguished on attributes alone?

Dennis dkorpel at gmail.com
Mon Jul 31 12:17:34 UTC 2023


On Monday, 31 July 2023 at 10:55:44 UTC, Quirin Schroll wrote:
> What am I missing here?

The duplicate definition check doesn't consider whether a 
function is actually unambiguously callable (without e.g. traits 
getOverloads), it only prevents creating the same linker symbol 
multiple time. So you can even do this:

```D
           void f() { }
extern(C) void f() { }
```

But this straight up looks like a bug:
```D
        void g() { }
static void g() { } // static doesn't even do anything here
```



More information about the Digitalmars-d-learn mailing list