January 25, 2004
The following code produces: "cannot implicitly convert int() to int".

import std.c.stdio;
struct A {
        int b() { return 1; }
}
int x() {
        A a;
        return a.b;
}
void main () {
        printf("%d\n",x());
}

I know I can make work doing "return a.b();", but what would be the purpose
of properties then?

-----------------------
Carlos Santander Bernal



January 26, 2004
Carlos Santander B. wrote:

[...]
> I know I can make work doing "return a.b();", but what would be
> the purpose of properties then?

It also works with `return a.b + 0;'.

Even the example in the docs does not compile, when the `+ 3' is deleted.

So long.