Skip to content
Snippets Groups Projects
Commit 9e525feb authored by Jan Gruteser's avatar Jan Gruteser
Browse files

avoid hard-coded access of type tool object

parent 58ce9546
No related branches found
No related tags found
No related merge requests found
package de.tla2b.types; package de.tla2b.types;
import de.tla2b.analysis.TypeChecker;
import tla2sany.semantic.SemanticNode; import tla2sany.semantic.SemanticNode;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -37,7 +38,7 @@ public abstract class AbstractHasFollowers extends TLAType { ...@@ -37,7 +38,7 @@ public abstract class AbstractHasFollowers extends TLAType {
// avoid concurrent modification: // avoid concurrent modification:
new ArrayList<>(followers).forEach(follower -> { new ArrayList<>(followers).forEach(follower -> {
if (follower instanceof SemanticNode) { if (follower instanceof SemanticNode) {
((SemanticNode) follower).setToolObject(5, newType); TypeChecker.setType((SemanticNode) follower, newType);
if (newType instanceof AbstractHasFollowers) { if (newType instanceof AbstractHasFollowers) {
((AbstractHasFollowers) newType).addFollower(follower); ((AbstractHasFollowers) newType).addFollower(follower);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment