[Issue 19848] colliding named imports in function silently fail to overload

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Aug 22 11:20:20 UTC 2021


Witold Baryluk <witold.baryluk+d at gmail.com> changed:

           What    |Removed                     |Added
                 CC|                            |witold.baryluk+d at gmail.com

--- Comment #1 from Witold Baryluk <witold.baryluk+d at gmail.com> ---
I just got hit by similar issue:

void main()
    import core.time : Duration, TickDuration, to;
    import std.conv : to;

    Duration dur;

onlineapp.d(6): Error: template `core.time.to` cannot deduce function from
argument types `!(TickDuration)(Duration)`, candidates are:
`to(string units, T, D)(D td)`

Moving imports to be at module level is a workaround.


More information about the Digitalmars-d-bugs mailing list