Why are opCall's not implicitely assignable?

Karen Lanrap karen at digitaldaemon.com
Sun Sep 17 15:48:04 PDT 2006


class C{
    int opCall(int i){
      return 2*i;
    }
}

int main(){
    auto c= new C;
    int x=c.opCall=3; // compiles
    int x=c=3; // does not compile
}



More information about the Digitalmars-d-learn mailing list