Summary: Possible problem with pure and const attribute
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2011-07-30 19:45:12 PDT ---
Is this a bug?

class Foo {
    const int x;
    pure void bar()
    in {
        int y = x;
    } body {}
void main() {}

DMD 2.054 gives:

temp.d(5): Error: pure nested function 'bar' cannot access mutable data 'x'

But x isn't even mutable.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to