D - bug? cannot implicitly convert int() to int
- "Carlos Santander B." <carlos8294 msn.com> Jan 25 2004
- Manfred Nowak <svv1999 hotmail.com> Jan 26 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
Jan 25 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.
Jan 26 2004








Manfred Nowak <svv1999 hotmail.com>