From b913f3caebbdc58acf596e31d809ebb083229721 Mon Sep 17 00:00:00 2001
From: Etienne Kneuss <ekneuss@gmail.com>
Date: Fri, 29 May 2015 19:26:03 +0200
Subject: [PATCH] Fix code-gen for Chars

---
 src/main/scala/leon/codegen/CodeGeneration.scala | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/scala/leon/codegen/CodeGeneration.scala b/src/main/scala/leon/codegen/CodeGeneration.scala
index 3e4af03bd..4125eaddd 100644
--- a/src/main/scala/leon/codegen/CodeGeneration.scala
+++ b/src/main/scala/leon/codegen/CodeGeneration.scala
@@ -978,7 +978,7 @@ trait CodeGeneration {
         mkExpr(l, ch)
         mkExpr(r, ch)
         l.getType match {
-          case Int32Type =>
+          case Int32Type | CharType =>
             ch << If_ICmpLt(thenn) << Goto(elze) 
           case IntegerType =>
             ch << InvokeVirtual(BigIntClass, "lessThan", s"(L$BigIntClass;)Z")
@@ -989,7 +989,7 @@ trait CodeGeneration {
         mkExpr(l, ch)
         mkExpr(r, ch)
         l.getType match {
-          case Int32Type =>
+          case Int32Type | CharType =>
             ch << If_ICmpGt(thenn) << Goto(elze) 
           case IntegerType =>
             ch << InvokeVirtual(BigIntClass, "greaterThan", s"(L$BigIntClass;)Z")
@@ -1000,7 +1000,7 @@ trait CodeGeneration {
         mkExpr(l, ch)
         mkExpr(r, ch)
         l.getType match {
-          case Int32Type =>
+          case Int32Type | CharType =>
             ch << If_ICmpLe(thenn) << Goto(elze) 
           case IntegerType =>
             ch << InvokeVirtual(BigIntClass, "lessEquals", s"(L$BigIntClass;)Z")
@@ -1011,7 +1011,7 @@ trait CodeGeneration {
         mkExpr(l, ch)
         mkExpr(r, ch)
         l.getType match {
-          case Int32Type =>
+          case Int32Type | CharType =>
             ch << If_ICmpGe(thenn) << Goto(elze) 
           case IntegerType =>
             ch << InvokeVirtual(BigIntClass, "greaterEquals", s"(L$BigIntClass;)Z")
-- 
GitLab