-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Hey, I have stumbled upon the following problem in Julia 1.1, here is a MWE:
julia> using Parameters
julia> @with_kw struct Foo; foo; end
Foo
julia> Foo(foo=2)
Foo
foo: Int64 2
julia> Foo(foo=Foo(foo=2))
Foo
foo: Int64 2
julia> Foo(foo=2) == Foo(foo=Foo(foo=2))
true
julia> Foo(2) == Foo(Foo(2))
true
Using standard structs
julia> struct Bar; bar; end
julia> Bar(2) == Bar(Bar(2))
false
Using Base.@kwdef
in Julia 1.1
julia> Base.@kwdef struct Baz; baz; end
Baz
julia> Baz(baz=2) == Baz(baz=Baz(baz=2))
false
julia> Baz(2) == Baz(Baz(2))
false
I have no idea why this happens, but it looks like a bug.
mauro3
Metadata
Metadata
Assignees
Labels
No labels