https://issues.dlang.org/show_bug.cgi?id=18566
Issue ID: 18566 Summary: const on method of nested data type is not applied to variables in context Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: timon.g...@gmx.ch void main(){ int i = 0; struct S{ int *fun()const pure{ return &i; // compiles, but shouldn't } } } The type of i within "fun" should be "const(int)". --