From e36a768d0cca8b2edf1697accf545f483eb5d111 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Tue, 29 Nov 2016 16:37:13 -0800 Subject: [PATCH] Use natural order of Cast expressions Reviewed By: cristianoc Differential Revision: D4232391 fbshipit-source-id: f3be9f8 --- infer/src/IR/Exp.re | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infer/src/IR/Exp.re b/infer/src/IR/Exp.re index 284053ff8..acee8545c 100644 --- a/infer/src/IR/Exp.re +++ b/infer/src/IR/Exp.re @@ -117,11 +117,11 @@ let rec compare e1 e2 => | (Const _, _) => (-1) | (_, Const _) => 1 | (Cast t1 e1, Cast t2 e2) => - let n = compare e1 e2; + let n = Typ.compare t1 t2; if (n != 0) { n } else { - Typ.compare t1 t2 + compare e1 e2 } | (Cast _, _) => (-1) | (_, Cast _) => 1