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

feat: one could add a type member that already exists (equals but not same) and modify it afterwards #1864

Merged
merged 2 commits into from
Feb 18, 2018

Conversation

monperrus
Copy link
Collaborator

fix #1862

@pvojtechovsky
Copy link
Collaborator

throw new SpoonException("ooops, impossible to have two constructors with the same signature");
I would say that is not good idea to fail when Spoon model is not 100% compilable/consistent.

  1. we cannot assure that Spoon model is 100% consistent
  2. during Spoon model transformation/refactoring the model might be temporarily inconsistent - until refactoring is finished. And your change might cause that refactoring fails in the middle or it would need more complicated algorithm, which avoids inconsistent states.

I would prefer instead a new spoon model method checkConsistency, which would report all inconsistencies. Such check would be then part of this consistency checking.

WDYT?

@monperrus
Copy link
Collaborator Author

Yes, I agree. Here is the alternative solution.

@pvojtechovsky pvojtechovsky merged commit fc1c421 into INRIA:master Feb 18, 2018
monperrus added a commit to monperrus/spoon that referenced this pull request Feb 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants