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
For correctness, Base.convert{X,Y}(::Type{Foo{X}}, y::Y, z::Int) = Foo{X,Y}(one(x), y, z) or Base.convert{X,Y}(::Type{Foo{X}}, y::Y, z::Int) = Foo{X,Y}(one(X), y, z) ?
I don't think this is supposed to work. We only define fallback to convert for single argument. In fact, I don't think you are supposed to define convert with more than two arguments, it won't be called anywhere.
This works:
So I would think this should work, but it doesn't:
If I define the constructor it's looking for rather than the
convert
method, it works:Note that I see similar behavior if I parameterize
z
's type instead of restricting it toInt
.I guess this is similar to #15120, but with multiple fields? Version info just in case:
The text was updated successfully, but these errors were encountered: