浏览代码

Ajout gestion long

Arthur Brandao 6 年之前
父节点
当前提交
d7ffad5064
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/migl/lisp/LispElement.java

+ 4 - 0
src/migl/lisp/LispElement.java

@@ -175,6 +175,10 @@ public class LispElement {
 		else if(elt.getClass() == Boolean.class) {
 			elt = LispBoolean.valueOf((boolean) elt);
 		}
+		else if(elt.getClass() == Long.class) {
+			Long l = (Long) elt;
+			elt = l.doubleValue();
+		}
 		else if(elt.getClass() != BigInteger.class && elt.getClass() != Double.class && elt.getClass() != LispBoolean.class && elt.getClass() != String.class) {
 			throw new IllegalArgumentException("Object class is not a Lisp element");
 		}