[Issue 19080] Order of overloads affects the chosen method
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jul 12 10:27:16 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19080
--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
(In reply to RazvanN from comment #0)
> //a.d
> struct Foo
> {
> private void fun(A)(A a) {}
> void fun(int a) {}
> }
>
> struct Bar
> {
> void fun(int a) {}
> private void fun(A)(A a) {}
> }
>
> // b.d
I forgot add here: import a.d
> void main()
> {
> Foo a;
> a.fun(42); // deprecation: a.Foo.fun is no visible
> Bar b;
> b.fun(42); // ok
> }
>
> Expectation : no deprecation at all
--
More information about the Digitalmars-d-bugs
mailing list