Possible bug - should the following code cause an access violation exception?

Ali Çehreli acehreli at yahoo.com
Mon Dec 30 08:15:38 PST 2013


On 12/29/2013 10:38 PM, Afshin wrote:
> 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 a ++next does not throw an exception.
> */

Must have already been fixed. No problem on git head.

Ali



More information about the Digitalmars-d-learn mailing list