[Issue 622] New: There should be a warning for unininitalized class reference
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 30 15:59:40 PST 2006
http://d.puremagic.com/issues/show_bug.cgi?id=622
Summary: There should be a warning for unininitalized class
reference
Product: D
Version: 0.175
Platform: PC
OS/Version: Windows
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: andkhropov at mtu-net.ru
This error is very common for people with C++ background (I've already seen
people asking questions about similar code several times):
----------------------------------------------
class Foo{
public int data;
}
void main()
{
Foo f; // obviously they try do this way as they got used to it in C++
// should be a warning here!
f.data = 1;// Access violation
}
----------------------------------------------
--
More information about the Digitalmars-d-bugs
mailing list