[P12][P13] Fixing bug that raised NodeNotFound
when an object-centric permalink was installed on a slot defined by a superclass of the object class
#16549
+75
−20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #16548
When installing an object-centric permalink on a variable slot, the method
registerAndInstallPermaLink:forTarget:
takes all nodes that access this slot and it installs the metalink on the equivalent nodes in the anonymous subclass of the object:However, if the target variable slot has been defined by one of the superclasses of the object, it does not exclude the accessing nodes that are not in the object's class hierarchy (so: the nodes from methods that are in brother/cousin classes). As a result, it will try to find equivalent nodes in the anonymous subclass but these nodes do not exist so an exception
NodeNotFound
is raised.This breaks object-centric debug points, for example
I fixed that method to only keep the accessing nodes that are in the class hierarchy of the target object.