Errors in specification?

Gide Nwawudu gide at btinternet.com
Mon Jun 16 03:15:06 PDT 2008


On Thu, 12 Jun 2008 23:37:23 +0200, "Simen Haugen"
<simen.haugen at pandavre.com> wrote:

>This is the property example from http://digitalmars.com/d/1.0/property.html
>
>int a;
>int b = 1;
>typedef int t = 2;
>t c;
>t d = cast(t)3;
>
>int.init // is 0
>a.init  // is 0
>b.init  // is 1 // Well, I get 0
>t.init  // is 2 // Well, I get 2
>c.init  // is 2 // Well, I get 2
>d.init  // is 3 // Well, I get 2
>
>struct Foo
>{
>    int a;
>    int b = 7;
>}
>
>Foo.a.init // is 0 // Well, I get 0
>Foo.b.init // is 7 // Well, I get 0
> ...

The .init error in spec is already in bugzilla.
http://d.puremagic.com/issues/show_bug.cgi?id=2045

Gide


More information about the Digitalmars-d-learn mailing list