Ver código fonte

Improved error message for Varptr

HurryStarfish 6 anos atrás
pai
commit
244c43cb8a
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      expr.bmx

+ 1 - 1
expr.bmx

@@ -1513,7 +1513,7 @@ Type TCastExpr Extends TExpr
 		If TVarPtrType(ty) Then
 		If TVarPtrType(ty) Then
 			If Not TVarExpr(expr) And Not TMemberVarExpr(expr) And Not (TStmtExpr(expr) And TIndexExpr(TStmtExpr(expr).expr)) Then
 			If Not TVarExpr(expr) And Not TMemberVarExpr(expr) And Not (TStmtExpr(expr) And TIndexExpr(TStmtExpr(expr).expr)) Then
 				If Not TIndexExpr(expr) Or (TIndexExpr(expr) And Not TVarExpr(TIndexExpr(expr).expr) And Not TMemberVarExpr(TIndexExpr(expr).expr))  Then
 				If Not TIndexExpr(expr) Or (TIndexExpr(expr) And Not TVarExpr(TIndexExpr(expr).expr) And Not TMemberVarExpr(TIndexExpr(expr).expr))  Then
-					Err "Subexpression for 'Ptr' must be a variable"
+					Err "Subexpression for 'Varptr' must be a variable or an element of an array, pointer or string"
 				End If
 				End If
 			End If
 			End If
 			exprType = src.Copy()
 			exprType = src.Copy()