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

Added static checks for overlapping fields #2

Merged
merged 4 commits into from
Jun 10, 2020

Conversation

Hirevo
Copy link
Owner

@Hirevo Hirevo commented Jun 9, 2020

Following the discussion at SOM-st/SOM#42, a proposition was made to add static checks to prevent classes from redefining an existing field.

yksom already went ahead and implemented these checks.

So, for consistency of behavior between interpreters, this PR is simply our own implementation of these checks.

@Hirevo Hirevo added C-bug Category: Bugs M-interpreter Module: Interpreter P-high Priority: High labels Jun 9, 2020
@Hirevo Hirevo self-assigned this Jun 9, 2020
Copy link
Contributor

@smarr smarr left a comment

Choose a reason for hiding this comment

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

Nice. Would be great to think about how to test it. Perhaps adopting the testing of yksom :)

som-interpreter/src/class.rs Outdated Show resolved Hide resolved
som-interpreter/src/class.rs Outdated Show resolved Hide resolved
@Hirevo Hirevo merged commit 465cb27 into master Jun 10, 2020
@Hirevo Hirevo deleted the feature/overlapping-fields branch June 10, 2020 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Bugs M-interpreter Module: Interpreter P-high Priority: High
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants