You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I spent several hours trying to understand what's going on there in RealTypeParamsModf.create_stub_casts but type parameter handling is just beyond my comprehension.
It seems that when it's processing Child1<A,B> while generating cast for the Child2<T> there's only Child1.A in reverse_params, but when it tries to process further and gets to Base<T>, it tries to find a mapping from Child1.B to Base.T and fails because reverse_params only has Child1.A... So to say, I don't even understand what did I just write :-P
Note that 94809e3 surfaced this issue in our unit tests (because some types were eliminated by DCE that accidentally had the same name as type params), so I added #if !cs at TestOverloads.hx with a TODO note for now. Please, don't forget to remove that after fixing this issue :)
Yeah that type parameter handling gave me a headache :P The issue was that reverse_params should store the type parameters that the current cast function should be called, when in reference to the current parent class
reduced from our test suite, which compiles only because we have a name clash between a type parameter name and some class name
problematic generated code:
The text was updated successfully, but these errors were encountered: