Hi, I've read on Bugzilla Issue 6398 that this is a bug:

static int value;
ref foo(){ printf("getter\n"); return value; }
ref foo(int x){ printf("setter\n"); value = x; return value; }

void main(){ foo = 1; }  // Should print "setter", but print "getter" in 2.054

But, this is pretty convenient syntax, no? That way you could implement only 
one function foo() and use it as setter and getter.

I'm a bit confused about it.

Thanks,
Daniel

Reply via email to