From a0ae4f08b689d1f8db63d9b6905141fb5fe2de15 Mon Sep 17 00:00:00 2001 From: Arne Keller Date: Mon, 5 Jul 2021 08:57:05 +0200 Subject: [PATCH] Fix type assumption highlight in let MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, (let g = λx.x in g) g was highlighted incorrectly --- src/main/java/edu/kit/typicalc/model/Tree.java | 1 + 1 file changed, 1 insertion(+) 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);