www.digitalmars.com         C & C++   DMDScript  

D - minor bugs - 1 attachment

reply Farmer <itsFarmer. freenet.de> writes:
Walter,

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


Farmer. 

begin 644 crash.d


M*2`F85LP+BXR,UT[("\O26YT97)N86P 97)R;W(Z("XN7'IT8UQC9V-S+F, 


M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+PT*


M4TE:15T[("\O1$U$(&-R87-H97, =VAE;B!-05A?4TE:12!I<R!N;W0 :6YI

M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O




M:60J*7`R*5LP+BXT-UT[("\O17)R;W(Z(%-Y;6)O;"!5;F1E9FEN960 7U]I

M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O
M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\-" T*<W1R=6-T(%-O;653=')U8W0-
M"GL-" E3;VUE4W1R=6-T(&8H:6YT(&XT*0T*"7L-" D)<F5T=7)N("IT:&ES
M.R` +R]W;W)K<SL-"B\O(')E='5R;B!T:&ES.R`O+R!%<G)O<CH 8V%N;F]T
M(&EM<&QI8VET;'D 8V]N=F5R="!3;VUE4W1R=6-T("H =&\ 4V]M95-T<G5C

M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O





M<R!C/6YE=R!I;G-T86YC92!!*&EN="DN4V]M951E;7!L871E0VQA<W,H*3L-
M"B\O(&,N<')I=F%T94UE;6)E<B I.R`O+R!%<G)O<CH (&-L87-S(%-O;654
M96UP;&%T94-L87-S(&UE;6)E<B!P<FEV871E365M8F5R(&ES(&YO="!A8V-E


M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O

M="!S;VUE1VQO8F%L5F%R.R` ("\O(&YO(&5R<F]R<R!R97!O<G1E9"`M(&)U
M="!T:&5N('=H870G<R!T:&4 ;65A;FEN9R!O9B`G<W1A=&EC)R!H97)E/PT*

M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\-



M<EM=*2(B.PDO+R!%<G)O<CH 9G5N8W1I;VX <VAL(&]V97)L;V%D<R!V;VED
M*&-H87(J=BD 86YD('9O:60H8VAA<EM==BD 8F]T:"!M871C:"!A<F=U;65N
M="!L:7-T(&9O<B!S:&P-" E!0VQA<W,N<VAL*&-A<W0H8VAA<EM=*2(B*3LO
*+R!W;W)K<PT*?0``
`
end
Jun 23 2003
parent reply Farmer <itsFarmer. freenet.de> writes:
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
 
Jun 26 2003
parent "Walter" <walter digitalmars.com> writes:
"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.
Jun 27 2003