From 8c3baa224f6375f61f5efdbb970b33f3df262528 Mon Sep 17 00:00:00 2001 From: Yanjun Jiang Date: Fri, 21 Nov 2014 11:25:34 -0500 Subject: [PATCH] Fix jTET does not support Boolean comparison bug. jTET does not support Boolean comparison now, no matter it is Equals or NotEquals. This is caused by the BooleanType is not included in the array list for the Equals and NotEquals cases in the getInputTypeForOutput function. We fix this by adding the BooleanType in the array list. --- src/main/java/ca/mcscert/jtet/expression/BinaryOperation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ca/mcscert/jtet/expression/BinaryOperation.java b/src/main/java/ca/mcscert/jtet/expression/BinaryOperation.java index 744d9ff..4c1c07b 100644 --- a/src/main/java/ca/mcscert/jtet/expression/BinaryOperation.java +++ b/src/main/java/ca/mcscert/jtet/expression/BinaryOperation.java @@ -53,7 +53,7 @@ public enum BinaryOperation { return Arrays.asList(new TypeMarker[]{RealType.Type, FixedPointType.TypeMarker}); case Equals: case NotEquals: - return Arrays.asList(new TypeMarker[]{RealType.Type, FixedPointType.TypeMarker, EnumerationType.TypeMarker}); + return Arrays.asList(new TypeMarker[]{BooleanType.Type, RealType.Type, FixedPointType.TypeMarker, EnumerationType.TypeMarker}); } return Arrays.asList(new TypeMarker[]{outputType}); } -- GitLab