Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Refactor model state definition #15

Merged
merged 14 commits into from
Apr 24, 2020
Merged

Refactor model state definition #15

merged 14 commits into from
Apr 24, 2020

Conversation

RomainFranceschini
Copy link
Owner

Use

state do 
    var foo : Type = value
    var bar : Type { lazy_value }
end

instead of

state_var foo : Type = value
state_var bar : Type { lazy_value }

Much less macro code used, state pattern now enforced.

@RomainFranceschini
Copy link
Owner Author

Travis CI failed (Crystal 0.34, LLVM 8.0.0) because both atomic_spec.cr and state_spec.cr declares two private classes with the same names. A type cast error happens only with LLVM 8.
Changing the names of the classes in one file seems to resolve the issue 🤷‍♂️

@RomainFranceschini RomainFranceschini marked this pull request as ready for review April 24, 2020 14:57
@RomainFranceschini RomainFranceschini merged commit 878f013 into master Apr 24, 2020
@RomainFranceschini RomainFranceschini deleted the refactor/state branch April 24, 2020 14:59
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.

1 participant