no property 'opCall' for type ... what am I doing wrong?
Chad J
gamerChad at _spamIsBad_gmail.com
Fri May 4 18:13:16 PDT 2007
main.d:
import std.stdio;
struct A
{
int member1;
}
struct B
{
int member2;
}
void main()
{
A a;
writefln( (cast(B)a).member2 );
}
That code results in the following compiletime errors:
main.d(16): Error: no property 'opCall' for type 'B'
main.d(16): Error: function expected before (), not 1 of type int
main.d(16): Error: no property 'member2' for type 'int'
I am using DMD 1.014 on Windows.
This seemed to work at some point in history, but not anymore. What am
I doing wrong?
Thanks
More information about the Digitalmars-d-learn
mailing list