digitalmars.D.bugs - [Issue 16248] New: nested const functions can mutate the aggregate
- via Digitalmars-d-bugs (28/28) Jul 07 2016 https://issues.dlang.org/show_bug.cgi?id=16248
https://issues.dlang.org/show_bug.cgi?id=16248 Issue ID: 16248 Summary: nested const functions can mutate the aggregate members Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: b2.temp gmx.com This compiles without error struct Foo { int i; void bar() { void foo() const /*immutable as well*/ { i = 1; } foo; } } --
Jul 07 2016