Fix type assumption highlight in let

Previously, (let g = λx.x in g) g was highlighted incorrectly
This commit is contained in:
Arne Keller 2021-07-05 08:57:05 +02:00
parent 116aea51c3
commit a0ae4f08b6

View File

@ -172,6 +172,7 @@ public class Tree implements TermVisitorTree {
TypeAbstraction newTypeAbstraction = new TypeAbstraction( TypeAbstraction newTypeAbstraction = new TypeAbstraction(
typeInfererLet.getType().orElseThrow(IllegalStateException::new), extendedTypeAssumptions); typeInfererLet.getType().orElseThrow(IllegalStateException::new), extendedTypeAssumptions);
extendedTypeAssumptions.remove(letTerm.getVariable());
extendedTypeAssumptions.put(letTerm.getVariable(), newTypeAbstraction); extendedTypeAssumptions.put(letTerm.getVariable(), newTypeAbstraction);
constraints.add(newConstraint); constraints.add(newConstraint);