Code:
```d
import std.stdio;

struct Field {
    void opAssign(int a) {
        writefln("Field.opAssign(%s)", a);
    }
}

struct Register {
    Field clock(int a) {
        writefln("Register.clock(%s)", a);
        return Field();
    }
}


void main() {
    Register register;
    register.clock(1) = 10; // works, good
    register.clock = 10;    // works too, how to disable it?
}
```
How to disable `register.clock = 10;` but allow `register.clock(1) = 10;`?
I want to get a compilation error on `register.clock = 10;`

Reply via email to