Browse Source

Unary overloading doesn't apply to "Not".

woollybah 7 years ago
parent
commit
c5c9aebb77
1 changed files with 1 additions and 1 deletions
  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))