https://issues.dlang.org/show_bug.cgi?id=24096
Issue ID: 24096
Summary: a pure function is in fact impure for local automatic
external variables
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: trivial
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
void main()
{
int a;
//a pure function is in fact impure for local automatic external
variables
pure void f(){int x = a;} // compile
pure void g(){int x; a = x;} // compile
}
--
