Static functions calls should only resolve to static functions

Paul Backus snarwin at gmail.com
Mon Oct 21 01:27:02 UTC 2024


On Monday, 21 October 2024 at 01:22:02 UTC, HuskyNator wrote:
> Currently, the combining of static and non-static function 
> overloads can cause static overloads to be ignored, even when 
> these are the _only_ fit.

Simplified example:

```d
struct S
{
     void foo(byte) {}
     static void foo(int) {}
}

void main()
{
     byte arg;
     S.foo(arg); // resolves to foo(byte)
}
```


More information about the dip.ideas mailing list