www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Another -inline bug

reply Victor Nakoryakov <nail-mail mail.ru> writes:
Hello one more time.

Following snipet does not compile with -inline flag and compiles without it:

 module core;
 
 struct Struct
 {
 	float opMul(float x)
 	{
 		return x;
 	}
 }
 
 class Class
 {
 	float opMul(float f)
 	{
 		return foo * f;
 	}
 	
 	Struct foo()
 	{
 		Struct s;
 		return s;
 	}
 }
 
 int main(char[][] args)
 {
 	return 0;	
 }
D:\proj\dtest>dmd -O -release -inline core.d core.d(16): this.foo() is not an lvalue -- Victor (aka nail) Nakoryakov nail-mail<at>mail<dot>ru Krasnoznamensk, Moscow, Russia
Jun 23 2005
parent Thomas Kuehne <thomas-dloop kuehne.this-is-spam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Victor Nakoryakov schrieb am Thu, 23 Jun 2005 20:43:02 +0400:
 Hello one more time.

 Following snipet does not compile with -inline flag and compiles without it:

 module core;
 
 struct Struct
 {
 	float opMul(float x)
 	{
 		return x;
 	}
 }
 
 class Class
 {
 	float opMul(float f)
 	{
 		return foo * f;
 	}
 	
 	Struct foo()
 	{
 		Struct s;
 		return s;
 	}
 }
 
 int main(char[][] args)
 {
 	return 0;	
 }
D:\proj\dtest>dmd -O -release -inline core.d core.d(16): this.foo() is not an lvalue
Added to DStress as http://dstress.kuehne.cn/run/i/inline_12_A.d http://dstress.kuehne.cn/run/i/inline_12_B.d http://dstress.kuehne.cn/run/i/inline_12_C.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCu8Il3w+/yD4P9tIRAqcKAJ0bzcsq6TL83EA+wNBS/pe5+rAVIACcCxVj FjUwkSDK9hWv4s1gY3E0qYw= =lxCz -----END PGP SIGNATURE-----
Jun 24 2005