[Issue 19606] Bad error message when two identical overloads exist as `@disable` and not

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 7 21:35:33 UTC 2019


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

Tiberiu Lepadatu <tiberiulepadatu14 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tiberiulepadatu14 at gmail.com

--- Comment #2 from Tiberiu Lepadatu <tiberiulepadatu14 at gmail.com> ---
(In reply to Basile-z from comment #0)
> code:
> 
>     class Foo
>     {
>         @disable this();
>         this(){}
>     }
> 
>     void main()
>     {
>         Foo foo = new Foo;
>     } 
> 
> > Error: `runnable.Foo.__ctor` called with argument types `()` matches both:
> 
> I think that the compiler should detect an error before this one and rather
> complain that the same function exists as `@disable` and not.

But why are you creating tow functions with the same name? What is the error
that you think that should be thrown?

--


More information about the Digitalmars-d-bugs mailing list