From e31cb5efeb224b6192a2ed7775dc8492402ea1c4 Mon Sep 17 00:00:00 2001 From: Johanna Stuber Date: Sun, 31 Jan 2021 17:13:39 +0100 Subject: [PATCH] Fix inconsistency due to merge --- package.json | 5 ++--- .../java/edu/kit/typicalc/model/TypeInferenceResult.java | 4 +++- src/main/java/edu/kit/typicalc/model/TypeInfererLet.java | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 87fa61b..a41af7e 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "webpack-dev-server": "3.11.0", "extract-loader": "5.1.0" }, - "hash": "76239929559a31ed723a76c78e7c2e75d64de46a237e99dd95361916eb0c4d96" + "hash": "8a8bb65418f58834b30cd258cd47da52573731720ea8967d4078487cb1253498" }, "dependencies": { "lit-element": "2.3.1", @@ -105,8 +105,7 @@ "@vaadin/vaadin-tabs": "3.2.0", "@vaadin/vaadin-lumo-styles": "1.6.0", "@vaadin/vaadin-material-styles": "1.3.2", - "open": "^7.2.1", - "@vaadin-component-factory/vcf-tooltip": "1.3.13" + "open": "^7.2.1" }, "devDependencies": { "compression-webpack-plugin": "4.0.1", diff --git a/src/main/java/edu/kit/typicalc/model/TypeInferenceResult.java b/src/main/java/edu/kit/typicalc/model/TypeInferenceResult.java index b8e878b..5a1a655 100644 --- a/src/main/java/edu/kit/typicalc/model/TypeInferenceResult.java +++ b/src/main/java/edu/kit/typicalc/model/TypeInferenceResult.java @@ -25,11 +25,13 @@ public class TypeInferenceResult { * * @param substitutions the substitutions to generate the mgu and the final type * @param typeVar the type variable belonging to the original lambda term + * @throws IllegalStateException if the given list of substitutions contains two substitutions for the same + * type variable; or if the calculated mgu contains no substitution for the given type variable */ protected TypeInferenceResult(List substitutions, TypeVariable typeVar) { mgu = new ArrayList<>(substitutions); findMGU(); - MGU.sort(Comparator.comparingInt((Substitution o) -> + mgu.sort(Comparator.comparingInt((Substitution o) -> o.getVariable().getIndex()).thenComparing(o -> o.getVariable().getKind())); finalType = findFinalType(typeVar); } diff --git a/src/main/java/edu/kit/typicalc/model/TypeInfererLet.java b/src/main/java/edu/kit/typicalc/model/TypeInfererLet.java index 838f471..0241f5b 100644 --- a/src/main/java/edu/kit/typicalc/model/TypeInfererLet.java +++ b/src/main/java/edu/kit/typicalc/model/TypeInfererLet.java @@ -36,6 +36,7 @@ public class TypeInfererLet extends TypeInferer { */ public List getLetConstraints() { return new ArrayList<>(); + // TODO } }