diff --git a/src/Devin/Typers.hs b/src/Devin/Typers.hs index b992fb5..fbdf51b 100755 --- a/src/Devin/Typers.hs +++ b/src/Devin/Typers.hs @@ -391,7 +391,7 @@ checkExpression expression = case expression of leftT <- checkExpression left rightT <- checkExpression right - if leftT <: rightT then + if rightT <: leftT then pure rightT else report' (InvalidBinary binary leftT rightT) diff --git a/thesis/thesis.tex b/thesis/thesis.tex index aedb8a6..c94ffe2 100755 --- a/thesis/thesis.tex +++ b/thesis/thesis.tex @@ -3231,7 +3231,7 @@ leftT <- checkExpression left rightT <- checkExpression right - if leftT <: rightT then + if rightT <: leftT then pure rightT else report' (InvalidBinary binary leftT rightT)