[Issue 11851] New: Memory Access Violation Exception on a postfix addition operation.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Dec 30 21:47:09 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11851

           Summary: Memory Access Violation Exception on a postfix
                    addition operation.
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: VisualD
        AssignedTo: nobody at puremagic.com
        ReportedBy: davidnia1 at gmail.com


--- Comment #0 from Afshin <davidnia1 at gmail.com> 2013-12-30 21:47:07 PST ---
// The following code throws an access violation exception:
// I am using D compiler version 2.64.2
// Visual Studio 2010 Ultimate
// Visual D

module test;

class Foo {
    public static ulong next = 0;

    public static ulong getNext() {
        return next++;
    }
}

void main() {
    Foo.getNext();
}

/*
The next++ is the culprit.
Using ++next does not throw an exception.
*/

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list