[Issue 671] New: Weird class reference declaration compiles
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Dec 9 17:31:39 PST 2006
http://d.puremagic.com/issues/show_bug.cgi?id=671
Summary: Weird class reference declaration compiles
Product: D
Version: 0.177
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: maxter at i.com.ua
This compiles and fails at runtime with access violation. Seems like opAssign
gets called on the uninitialized class reference.
class Test
{
int a;
void opAssign(int v)
{
a = v;
}
}
void main()
{
Test t = 20;
}
--
More information about the Digitalmars-d-bugs
mailing list