浏览代码

Improved error message for String + Object error. Fixes #424

woollybah 6 年之前
父节点
当前提交
3a8b9f640f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      expr.bmx

+ 1 - 1
expr.bmx

@@ -1860,7 +1860,7 @@ Type TBinaryMathExpr Extends TBinaryExpr
 			Else If TVoidType( exprType ) Then
 				Err "Illegal operation on a void expression."
 			Else If Not TNumericType( exprType ) And Not IsPointerType( exprType, 0, TType.T_POINTER ) And Not TArrayType( exprType ) And Not TBoolType( exprType )
-				Err "Illegal expression type."
+				Err "Operator " + op + " is not defined between types '" + lhs.exprType.ToString() + "' and '" + rhs.exprType.ToString() + "'"
 			Else If IsPointerType( exprType, 0, TType.T_POINTER ) And op <> "+" And op <> "-" Then
 				Err "Illegal expression type."
 			Else If IsPointerType( lhs.exprType, 0, TType.T_POINTER ) And IsPointerType( rhs.exprType, 0, TType.T_POINTER ) And op <> "-" Then