[Issue 24096] New: a pure function is in fact impure for local automatic external variables
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 22 00:51:37 UTC 2023
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: nobody at puremagic.com
Reporter: andreiD at yopmail.com
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
}
--
More information about the Digitalmars-d-bugs
mailing list