Thread overview
dmd 0.47 release
Oct 22, 2002
Walter
Oct 23, 2002
Patrick Down
Oct 23, 2002
Patrick Down
Oct 23, 2002
Burton Radons
Oct 23, 2002
Burton Radons
Oct 23, 2002
Walter
October 22, 2002
Fix Burton's reported bugs on arrays of small structs, and unit test failures in stream.d.


October 23, 2002
/*
Ok here is a fun one.  The following program crashes
at the line commented  "Crash right here!!"
But if I comment out the line stated in the
in the TableLayout class it does not crash.
*/


interface ILayout
{
  void setHostFrame(FrameWindow host);
}

class FrameWindow
{
  public
  {
    void setLayout(ILayout lo)
    {
      printf("pointers are ok %p %p\n",this,lo);
      lo.setHostFrame(this); // Crash right here!!
      printf("Hey I didn't crash\n");
    }
  }
}

class TableLayout : ILayout
{
  public
  {
    void setHostFrame(FrameWindow host)
    {
    }
  }

  protected
  {
    // Comment out the next line and I do not crash!
    bit         group;
  }
}


class MyWindow : FrameWindow
{
  public
  {
    this()
    {
      setLayout(new TableLayout());
    }
  }
}



int main(char[][] args)
{
  MyWindow appWin = new MyWindow();

  return 0;
}
October 23, 2002
Here is another weird one.
This program should print "here"
but does not.

struct Size
{
  int width;
  int height;
}

void foo(out Size sz)
{
  sz.width = 0;

  if(sz.width == 0)
    printf("here\n"); // Does not do this line
}


int main(char[][] argv)
{
  Size sz;

  foo(sz);

  return 1;
}
October 23, 2002
Walter wrote:
> Fix Burton's reported bugs on arrays of small structs, and unit test
> failures in stream.d.

That got all the problems, thanks!  Tested with and without -O and with and without -release.

October 23, 2002
The Stream constructor is flagged private:

    private this () { }

Which doesn't allow it to be subclassed outside of this module!

October 23, 2002
Anyone know where Pavel is lately? <g>

"Burton Radons" <loth@users.sourceforge.net> wrote in message news:ap6ng8$2k0t$1@digitaldaemon.com...
> The Stream constructor is flagged private:
>
>      private this () { }
>
> Which doesn't allow it to be subclassed outside of this module!
>