Conversation
|
There is the caveat, that this does not seem to work with the jit yet, this is why that '--compare=jit` is commented out. It unhelpfully crashes with: Maybe I am also holding it wrong, but it should never crash, but have a useful error message. In any case, if the code looks good (and there is a desire for a duck type example), then I guess merging and then having a separate bug (Update: that bug is #4901) pointing to the jit situation that then can be resolved in a second step would be good. |
fc2b8f8 to
2d1162c
Compare
|
Ok, I found why it crashed (a function declared in impl was never called and thus dead code, but it resulted in a crash of I'll file a separate bug for that (once this example is in, I can easily point to this example and go from there. So will file after this example is submitted). For now, I made the example work by actually calling each of the functions in the impl (from() and default() was not called for all tests). |
|
Isolated the issue I was seeing and filed #4901 |
2d1162c to
e6b0029
Compare
Even without traits, operations that look the same can be applied to different types.
e6b0029 to
2e6b02b
Compare
|
#4901 is fixed, so the observation in #4899 (comment) above does not happen anymore. Maybe this PR went under the radar ? It might be useful, but I don't know if something like this is to be covered by traits and is in the pipeline (didn't find any reference to Probably something to review for @richmckeever or @erinzmoore ? |
Even without traits, operations that look the same can be applied to different types.