ソースを参照

Add short、byte、BigInteger support

James 5 年 前
コミット
ea9b73b660
1 ファイル変更1 行追加0 行削除
  1. 1 0
      src/main/java/com/jfinal/template/expr/ast/Unary.java

+ 1 - 0
src/main/java/com/jfinal/template/expr/ast/Unary.java

@@ -83,6 +83,7 @@ public class Unary extends Expr {
 				return ((BigInteger)n).negate();
 			}
 			if (n instanceof Short || n instanceof Byte) {
+				// short、byte 取负时转换为 int 型, java 语言亦如此
 				return Integer.valueOf(-((Number)n).intValue());
 			}