On 2019-12-03 16:34:43 +0000, Robert M. Münch said:

I have very strange casting error I don't understand:

alias typeof(windows_message_streams[WM_MOUSEMOVE].filter!(win => (win.wParam & MK_LBUTTON))) WM_MOUSEMOVE_LBUTTON_TYPE;
WM_MOUSEMOVE_LBUTTON_TYPE WM_MOUSEMOVE_LBUTTON_STREAM;
pragma(msg,typeof(WM_MOUSEMOVE_LBUTTON_STREAM));

FilterObservable!(__lambda39, SubjectObject!(OS_State))

WM_MOUSEMOVE_LBUTTON_STREAM = cast(WM_MOUSEMOVE_LBUTTON_TYPE)(windows_message_streams[WM_MOUSEMOVE].filter!(win => (win.wParam & MK_LBUTTON))); pragma(msg,typeof(wstreams[WM_MOUSEMOVE].filter!(win => (win.wParam & MK_LBUTTON))));

FilterObservable!(__lambda7, SubjectObject!(OS_State))

..\..\gui.d(317,104): Error: cannot cast expression filter(windows_message_streams[512u]) of type FilterObservable!(__lambda6, SubjectObject!(OS_State)) to FilterObservable!(__lambda39, SubjectObject!(OS_State)) because of different sizes
FilterObservable!(__lambda7, SubjectObject!(OS_State))

My code worked in the past but now it doesn't and I don't know why. I don't understand the "because of different sizes" message.

It looks like I have to explicitly create a lambda and re-use it. But how to do that?

So, it all boils down to a breaking change in the RX framework... which I still don't understand...

--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

Reply via email to