digitalmars.D.bugs - -inline with 'with'
- Victor Nakoryakov (9/35) Jun 23 2005 D:\proj\dtest>dmd -O -release -inline core.d
- Thomas Kuehne (14/45) Jun 24 2005 -----BEGIN PGP SIGNED MESSAGE-----
Hi all.module core; struct Struct { static Struct foo() { Struct s; with (s) {} // bug return s; } static Struct bar() { return Struct.foo() * Struct.foo(); } Struct opMul(Struct s) { return s; } } int main(char[][] args) { return 0; }D:\proj\dtest>dmd -O -release -inline core.d core.d(15): foo() is not an lvalue Snipet has no error if there is no -inline flag or if I'll comment line marked as bug. -- Victor (aka nail) Nakoryakov nail-mail<at>mail<dot>ru Krasnoznamensk, Moscow, Russia
Jun 23 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Victor Nakoryakov schrieb am Thu, 23 Jun 2005 14:33:39 +0400:Hi all.Added to DStress as http://dstress.kuehne.cn/run/i/inline_11_A.d http://dstress.kuehne.cn/run/i/inline_11_B.d http://dstress.kuehne.cn/run/i/inline_11_C.d http://dstress.kuehne.cn/run/i/inline_11_D.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCu76C3w+/yD4P9tIRAognAJsE4g2UYfUt8nV0szsSGxJYLPVNnwCdEl2o mKTIEwq8sbLnYQSwuNBjOfQ= =pNu2 -----END PGP SIGNATURE-----module core; struct Struct { static Struct foo() { Struct s; with (s) {} // bug return s; } static Struct bar() { return Struct.foo() * Struct.foo(); } Struct opMul(Struct s) { return s; } } int main(char[][] args) { return 0; }D:\proj\dtest>dmd -O -release -inline core.d core.d(15): foo() is not an lvalue Snipet has no error if there is no -inline flag or if I'll comment line marked as bug.
Jun 24 2005