diff --git a/src/main/java/edu/kit/typicalc/model/Tree.java b/src/main/java/edu/kit/typicalc/model/Tree.java index 939357e..fe7825c 100644 --- a/src/main/java/edu/kit/typicalc/model/Tree.java +++ b/src/main/java/edu/kit/typicalc/model/Tree.java @@ -172,6 +172,7 @@ public class Tree implements TermVisitorTree { TypeAbstraction newTypeAbstraction = new TypeAbstraction( typeInfererLet.getType().orElseThrow(IllegalStateException::new), extendedTypeAssumptions); + extendedTypeAssumptions.remove(letTerm.getVariable()); extendedTypeAssumptions.put(letTerm.getVariable(), newTypeAbstraction); constraints.add(newConstraint);