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

copy constructor not dealing with contained references properly. #42

Open
pahjbo opened this issue Jan 16, 2024 · 2 comments
Open

copy constructor not dealing with contained references properly. #42

pahjbo opened this issue Jan 16, 2024 · 2 comments
Labels
Beta Current released tooling has an implementation in test bug Something isn't working Java is only for the java implementation

Comments

@pahjbo
Copy link
Member

pahjbo commented Jan 16, 2024

Copy constructors are not copying references by design - however, in the case of contained references it might be appropriate to copy references. This is complicated by the fact that whether the copy is appropriate depends on where the original copy started.

@pahjbo pahjbo added bug Something isn't working Java is only for the java implementation labels Jan 16, 2024
@pahjbo
Copy link
Member Author

pahjbo commented Jan 17, 2024

see also #41 where the rules for "contained" references need to be defined.

pahjbo added a commit that referenced this issue Feb 15, 2024
The API is subject to change as it requires some "magic" calls before and after the clone

This goes most of the way to fixing #42
@pahjbo
Copy link
Member Author

pahjbo commented Feb 22, 2024

think that release 0.4.4 contains a fix for this - however keeping issue open as might change the API depending on experience of use.

model.createContext();
ATest atestprime = new ATest(atest);
atestprime.updateClonedReferences();

@pahjbo pahjbo added the Beta Current released tooling has an implementation in test label Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Beta Current released tooling has an implementation in test bug Something isn't working Java is only for the java implementation
Projects
None yet
Development

No branches or pull requests

1 participant