[Issue 1852] New: you get opCall missing when cast to a struct(diagnostic)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 19 03:03:13 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1852
Summary: you get opCall missing when cast to a struct(diagnostic)
Product: D
Version: 1.026
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: diagnostic
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: davidl at 126.com
struct mystruct{}
void main()
{
mystruct* a= new mystruct;
mystruct b= cast(mystruct)a;
}
teststructnew.d(5): Error: no property 'opCall' for type 'mystruct'
teststructnew.d(5): Error: function expected before (), not 1 of type int
teststructnew.d(5): Error: no property 'opCall' for type 'mystruct'
teststructnew.d(5): Error: function expected before (), not 1 of type int
teststructnew.d(5): Error: cannot implicitly convert expression (1(1(a))) of
type int to mystruct
I think message: cannot implicitly convert from type mystruct* to mystruct
would be more clear.
--
More information about the Digitalmars-d-bugs
mailing list