On Friday, 30 January 2015 at 22:41:35 UTC, Ali Çehreli wrote:
I am thinking about opening a bug with the following code:

struct S
{
    @disable this();

    static void opCall()
    {}
}

void main()
{}

Error: struct deneme.S static opCall is hidden by constructors and can never be called

Which seems to be due to the following change:


https://github.com/D-Programming-Language/dmd/commit/79ae211e71cf0937523010e39f7f0981e9550904

What do you think?

Ali

It should only be an error when static opCall() cant be distinguishable from this.

---
struct S
{
    @disable this();
    static string opCall(){return "yo mister White";}
}
void main()
{}
---

is distinguishable (by return type) but cant be compiled.
You're right there's a problem.

Reply via email to