Skip to content

Commit

Permalink
Merge pull request #82 from pepijndevos/patch-1
Browse files Browse the repository at this point in the history
Use strict equality for comparing properties
  • Loading branch information
jw3126 authored Mar 19, 2024
2 parents 8e3e773 + 53825d9 commit 10cf413
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ConstructionBase"
uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
authors = ["Takafumi Arakaki", "Rafael Schouten", "Jan Weidner"]
version = "1.5.4"
version = "1.5.5"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
4 changes: 3 additions & 1 deletion src/ConstructionBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ getproperties(o::Tuple) = o

if VERSION >= v"1.7"
function check_properties_are_fields(obj)
if propertynames(obj) != fieldnames(typeof(obj))
# for ntuples of symbols `===` is semantically the same as `==`
# but triple equals is easier for the compiler to optimize, see #82
if propertynames(obj) !== fieldnames(typeof(obj))
error("""
The function `Base.propertynames` was overloaded for type `$(typeof(obj))`.
Please make sure `ConstructionBase.setproperties` is also overloaded for this type.
Expand Down

2 comments on commit 10cf413

@jw3126
Copy link
Member Author

@jw3126 jw3126 commented on 10cf413 Mar 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/103151

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.5.5 -m "<description of version>" 10cf41395e58a67f322cd7d6d35649b7f589dbc5
git push origin v1.5.5

Please sign in to comment.