[Issue 8753] New: Too aggressive expansion for variables which have void initializer
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 4 06:20:27 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8753
Summary: Too aggressive expansion for variables which have void
initializer
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2012-10-04 06:14:34 PDT ---
Current dmd aggressively expand const/immutable variables in optimization, but
it reports unuseful errors against void initialized variables.
This code should compile, but doesn't.
void main()
{
int mx = void;
const int cx = void;
immutable int ix = void;
mx = cx; // Error: void initializer has no value
mx = ix; // Error: void initializer has no value
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list