Bug 11391 – Variables can be marked pure

Status
RESOLVED
Resolution
DUPLICATE
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-30T16:19:00Z
Last change time
2013-10-30T16:23:17Z
Assigned to
nobody
Creator
aliloko

Comments

Comment #0 by aliloko — 2013-10-30T16:19:42Z
Don't know if intended, but I find it strange that variables can be annotated as "pure". In a similar way, variables can be annotated as @system/@trusted/@safe and nothrow . --------- Example ---------- import std.stdio; void main() { pure nothrow @safe int a = 4; writefln("%s", a); a = 2; writefln("%s", a); } ----------------------------
Comment #1 by safety0ff.bugz — 2013-10-30T16:23:17Z
*** This issue has been marked as a duplicate of issue 7432 ***