Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve error message for push_back when using an immutable type #577

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

jmcarcell
Copy link
Member

@jmcarcell jmcarcell commented Apr 9, 2024

BEGINRELEASENOTES

  • Improve error message for push_back when using an immutable type

ENDRELEASENOTES

Possible (wrong) meaning that can be inferred from the current one: this is a subset collection and you are trying to push a mutable object so "Can only add immutable objects to subset collections", therefore you should change your mutable object to immutable object (wrong conclusion).

With the new one I don't think the wrong meaning can be inferred; it means you are pushing an immutable object but "Immutable objects can only be added to subset collections", which means it's not a subset collection, and the answer here is to change from immutable to mutable.

Copy link
Collaborator

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

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

Thanks. Indeed less confusing this way.

@tmadlener tmadlener merged commit 5964958 into AIDASoft:master Apr 10, 2024
18 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants