enum x = 1; //line 1
void* foo()
{
return x; //line 2
}
void main()
{
}
The error (Error: cannot implicitly convert expression (1) of type int to void*) is reported to be on line 1 instead of line 2.
Pretty confusing.
Comment #1 by bearophile_hugs — 2011-02-15T03:53:14Z
See bug 4076
Comment #2 by samukha — 2011-02-15T04:03:49Z
*** This issue has been marked as a duplicate of issue 4076 ***