From 1098c184c0d4daa78b32184de9b218c339814dd9 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Mon, 15 Jan 2024 17:19:45 +0100 Subject: [PATCH] fixed bug in testing for reflexive relation in transitive closure code --- .../impl/persistent/PersistentHashIndexedBinaryRelation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/usethesource/vallang/impl/persistent/PersistentHashIndexedBinaryRelation.java b/src/main/java/io/usethesource/vallang/impl/persistent/PersistentHashIndexedBinaryRelation.java index ec9c2275..388c82e4 100644 --- a/src/main/java/io/usethesource/vallang/impl/persistent/PersistentHashIndexedBinaryRelation.java +++ b/src/main/java/io/usethesource/vallang/impl/persistent/PersistentHashIndexedBinaryRelation.java @@ -547,7 +547,7 @@ public ISet closure() { Type tupleType = getElementType(); assert tupleType.getArity() == 2; Type keyType = tupleType.getFieldType(0); - Type valueType = tupleType.getFieldType(0); + Type valueType = tupleType.getFieldType(1); if (!keyType.comparable(valueType)) { // if someone tries, then we have a very quick answer