Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@janmasrovira
Copy link
Collaborator

@janmasrovira janmasrovira commented Jul 9, 2025

This pr adds destructurs as new members of a class.
On the user level, a destructor definition consists only of the invariant specification, which takes self as an object and additional custom arguments.
I've added an example destructor in the owned counter example. The destructor only allows the counter to be destroyed if it has reached a value of at least 10.

@janmasrovira janmasrovira self-assigned this Jul 9, 2025
@janmasrovira janmasrovira force-pushed the destructor branch 5 times, most recently from 179575d to 66162b7 Compare July 11, 2025 13:08
@janmasrovira janmasrovira marked this pull request as ready for review July 11, 2025 14:07
@janmasrovira janmasrovira requested a review from lukaszcz July 11, 2025 14:07
janmasrovira and others added 2 commits July 11, 2025 16:46
Co-authored-by: Łukasz Czajka <[email protected]>
Co-authored-by: Łukasz Czajka <[email protected]>
lukaszcz
lukaszcz previously approved these changes Jul 11, 2025
@lukaszcz lukaszcz merged commit fde7b16 into main Jul 11, 2025
2 checks passed
@lukaszcz lukaszcz deleted the destructor branch July 11, 2025 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants