瀏覽代碼

Abs() accepts boolean args. Fixes #180.

woollybah 9 年之前
父節點
當前提交
c2ef81c2b5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      expr.bmx

+ 1 - 1
expr.bmx

@@ -2506,7 +2506,7 @@ Type TAbsExpr Extends TBuiltinExpr
 
 
 		expr=expr.Semant()
 		expr=expr.Semant()
 
 
-		If TNumericType(expr.exprType) Then
+		If TNumericType(expr.exprType) Or TBoolType(expr.exprType) Then
 			If TIntType(expr.exprType) Or TByteType(expr.exprType) Or TShortType(expr.exprType) Then
 			If TIntType(expr.exprType) Or TByteType(expr.exprType) Or TShortType(expr.exprType) Then
 				exprType=New TIntType
 				exprType=New TIntType
 			Else
 			Else