浏览代码

Unary overloading doesn't apply to "Not".

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

+ 1 - 1
expr.bmx

@@ -1609,7 +1609,7 @@ Type TUnaryExpr Extends TExpr
 		expr = expr.Semant()
 
 		' operator overload?
-		If TObjectType(expr.exprType) Then
+		If TObjectType(expr.exprType) And (op = "+" Or op = "-" Or op = "~~") Then
 			'Local args:TExpr[] = [rhs]
 			Try
 				Local decl:TFuncDecl = TFuncDecl(TObjectType(expr.exprType).classDecl.FindFuncDecl(op, Null,,,,True,SCOPE_CLASS_HEIRARCHY))