[Issue 19569] overload resolution not right?

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 10 09:13:36 UTC 2019


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

--- Comment #9 from Simen Kjaeraas <simen.kjaras at gmail.com> ---
> Right... but that's a bug, right? The 2 functions definitely have different (and correct) signatures, so the overload resolution should work just like the simple case?

Absotively. I back you 100% in that this is a bug, and should absolutely not
require a DIP in any form.


> How can they both be nothrow? One is nothrow, the other is not... they're extern, so they can't infer anything. The instantiated templates should have identical signatures to the functions above.

Ah, you're right - I forgot extern templates are a thing. For completion then,
an example of how attributes are indeed not inferred for extern templates:

void foo()();

void test() nothrow
{
    foo(); // Error: function `foo!().foo` is not `nothrow`
}

--


More information about the Digitalmars-d-bugs mailing list