Bug 3899 – CTFE: poor error message for use of uninitialized variable
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
Other
OS
Windows
Creation time
2010-03-08T11:16:00Z
Last change time
2014-04-18T09:12:07Z
Keywords
diagnostic, patch
Assigned to
nobody
Creator
clugdbug
Comments
Comment #0 by clugdbug — 2010-03-08T11:16:54Z
The code below generates the error "void initializer has no value"
which is a bit unclear.
(I'm entering this bug only because I've fixed it in another patch).
=====
int gar()
{
ArrayRet z = void;
ArrayRet w = z;
z.x += 2;
return z.x;
}
static assert(gar()==2);