Skip to content

== for immutables should recursively call == on its fields #4648

@StefanKarpinski

Description

@StefanKarpinski

This doesn't make much sense:

julia> immutable Foo{T}
         bar::T
       end

julia> Foo("baz") == Foo("baz")
false

julia> Foo("baz").bar == Foo("baz").bar
true

julia> Foo(1) == Foo(1)
true

If the fields are == to each other then the objects should be == to each other.

Metadata

Metadata

Labels

breakingThis change will break codeequalityIssues relating to equality relations: ==, ===, isequalhelp wantedIndicates that a maintainer wants help on an issue or pull requestneeds decisionA decision on this change is needed

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions