Re: Variable shadowing bug?

2013-06-11 Thread denizzz
On Tuesday, 11 June 2013 at 16:37:18 UTC, denizzz wrote: On Tuesday, 11 June 2013 at 11:22:15 UTC, bearophile wrote: denizzz: This message looks weird. I am spent hour to find this bug. :-( Why aren't you just using code like this? sfTime r = sfClock_getElapsedTime(sfPtr); return T

Re: Variable shadowing bug?

2013-06-11 Thread denizzz
On Wednesday, 12 June 2013 at 02:01:27 UTC, denizzz wrote: On Wednesday, 12 June 2013 at 01:17:50 UTC, Mike Parker wrote: On Tuesday, 11 June 2013 at 16:37:18 UTC, denizzz wrote: Ok, but why compiler says that types of these types is equal? ...that typeids of these types are equal?

Re: Variable shadowing bug?

2013-06-11 Thread denizzz
On Wednesday, 12 June 2013 at 01:17:50 UTC, Mike Parker wrote: On Tuesday, 11 June 2013 at 16:37:18 UTC, denizzz wrote: sfTime* r = sfClock_getElapsedTime(sfPtr); says what sfTime can not be implictly converted to sfTime sfClock_getElapsedTime does not return a pointer. You're goi

Re: Variable shadowing bug?

2013-06-11 Thread denizzz
On Tuesday, 11 June 2013 at 11:22:15 UTC, bearophile wrote: denizzz: This message looks weird. I am spent hour to find this bug. :-( Why aren't you just using code like this? sfTime r = sfClock_getElapsedTime(sfPtr); return Time(r); sfTime* r = sfClock_getElapsedTime(sfPtr); says

Variable shadowing bug?

2013-06-11 Thread denizzz
Piece of code: https://github.com/denizzzka/DSFML/blob/237a752988c76e3c2f63ed03ae12558823ce43ec/dsfml/system.d#L53 Time getElapsedTime() const { auto r = sfClock_getElapsedTime(sfPtr); static assert( is (typeof(r) == sfT