August 22, 2023 [Issue 24096] New: a pure function is in fact impure for local automatic external variables | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: andreiD@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 } -- |
Copyright © 1999-2021 by the D Language Foundation