[Issue 14160] New: [REG2.066] mutable global data access is wrongly accepted in pure function

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Feb 9 18:27:29 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14160

          Issue ID: 14160
           Summary: [REG2.066] mutable global data access is wrongly
                    accepted in pure function
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: k.hara.pg at gmail.com

Test case

int g;
int* f1() pure
{
    return &g;   // should be rejected, but doesn't
}

--


More information about the Digitalmars-d-bugs mailing list