Open
Description
I think this is a bug -- functor(typeof(x), y)
should always use x
's field names on y
:
julia> struct Foo; x; y; end
julia> @functor Foo
julia> struct AnotherFoo; x; y; end
julia> x = Foo([1, 2], 3);
julia> y = AnotherFoo([4, 5], 6);
julia> z = (x = [7, 8], y = 9);
julia> functor(x)
((x = [1, 2], y = 3), var"#31#32"())
julia> functor(typeof(x), y)
((x = [4, 5], y = 6), var"#31#32"())
julia> functor(typeof(z), y) # this is wrong?
(AnotherFoo([4, 5], 6), Functors.var"#5#6"())
Metadata
Metadata
Assignees
Labels
No labels