Thread overview
minor bugs - 1 attachment
Jun 23, 2003
Farmer
Jun 26, 2003
Farmer
Jun 27, 2003
Walter
June 23, 2003
Walter,

the attachment shows some bugs, that I found in DMD 0.67 (Win).


Farmer.


June 26, 2003
I slowly start to realize that "this" is a pointer for structs, so

struct SomeStruct
{
   SomeStruct f(int n4)
   {
	return *this;
    	// return this; // Error: cannot implicitly convert SomeStruct * to
   }
}

isn't a bug at all.

Now I discovered that I can refer via the structname to (non-static) member variables. This seems odd. Is this a bug or is it sugar to avoid the rather painful use of "(*this)."

struct SomeStruct
{
   void toString()
   {
   }
   void memberFunction()
   {
      toString();            // correct, but sometimes hard to understand
      (*this).toString();    // correct, but clumsy to write
      SomeClass.toString();  // access member variable via static reference
   }
};




Farmer <itsFarmer.@freenet.de> wrote in news:Xns93A3CC1351191itsFarmer@63.105.9.61:

> 
> Walter,
> 
> the attachment shows some bugs, that I found in DMD 0.67 (Win).
> 
> 
> Farmer.
> 
> begin 644 crash.d
> Attachment decoded: crash.d
> `
> end
> 

June 27, 2003
"Farmer" <itsFarmer.@freenet.de> wrote in message news:Xns93A6D6CEE6038itsFarmer@63.105.9.61...
>       SomeClass.toString();  // access member variable via static
reference

That shouldn't work.