January 11, 2019
https://issues.dlang.org/show_bug.cgi?id=19569

Rainer Schuetze <r.sagitario@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |r.sagitario@gmx.de

--- Comment #11 from Rainer Schuetze <r.sagitario@gmx.de> ---
> So, I understand we can overload on `nothrow`

I'm not aware that overloading on function attributes is possible. Do you have a reference in the specigfication?

--
January 11, 2019
https://issues.dlang.org/show_bug.cgi?id=19569

--- Comment #12 from Manu <turkeyman@gmail.com> ---
I don't have a reference... I've just been doing it for years and assumed it
was intended functionality.
I mean, it's certainly necessary that we overload on
const/immutable/shared/etc... so I figured the other attributes come naturally
too.

--
January 11, 2019
https://issues.dlang.org/show_bug.cgi?id=19569

--- Comment #13 from Rainer Schuetze <r.sagitario@gmx.de> ---
> that we overload on const/immutable/shared

These are type modifiers for 'this', so they are different.

--
January 11, 2019
https://issues.dlang.org/show_bug.cgi?id=19569

--- Comment #14 from Manu <turkeyman@gmail.com> ---
Well either way, it seems to work and I've been using it for years.

--
January 11, 2019
https://issues.dlang.org/show_bug.cgi?id=19569

--- Comment #15 from Rainer Schuetze <r.sagitario@gmx.de> ---
Can you show an example? The one above does not: https://run.dlang.io/is/JCgWPp

--
January 12, 2019
https://issues.dlang.org/show_bug.cgi?id=19569

--- Comment #16 from Manu <turkeyman@gmail.com> ---
Oh wow... interesting.
I think I have broken code floating around :/

So, is the issue here that it's possible to emit 2 functions that have
ambiguous distinction, but no compile error?
If a nothrow function can call either one, then it probably shouldn't just pick
one, but rather emit an ambiguous call error instead?

--
March 03, 2019
https://issues.dlang.org/show_bug.cgi?id=19569

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #17 from Dlang Bot <dlang-bot@dlang.rocks> ---
@look-at-me created dlang/dmd pull request #9406 "[Reg 2.074.1] Fix Issue 19569 Fixed overload resolution giving priority to covariants when should be ambiguous." fixing this issue:

- Fix Issue  19569 Fixed overload resolution giving priority to covariants when should be ambiguous.

https://github.com/dlang/dmd/pull/9406

--
March 12, 2019
https://issues.dlang.org/show_bug.cgi?id=19569

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305@gmail.com

--- Comment #18 from RazvanN <razvan.nitu1305@gmail.com> ---
(In reply to Manu from comment #16)
> Oh wow... interesting.
> I think I have broken code floating around :/
> 
> So, is the issue here that it's possible to emit 2 functions that have
> ambiguous distinction, but no compile error?
> If a nothrow function can call either one, then it probably shouldn't just
> pick one, but rather emit an ambiguous call error instead?

But it doesn't pick one randomly, it picks the "better one" which is the one that is pure/@safe/nothrow/@nogc

--
March 13, 2019
https://issues.dlang.org/show_bug.cgi?id=19569

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #19 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #9406 "[Reg 2.074.1] Fix Issue  19569 Fixed overload resolution giving priority to covariants when should be ambiguous." was merged into master:

- 3e29f1141b76aa087eab2dc917bd250174560abd by look-at-me:
  Fix Issue  19569 Fixed overload resolution giving priority to covariants when
should be ambiguous.

https://github.com/dlang/dmd/pull/9406

--
1 2
Next ›   Last »