Explorar o código

Cast to array should be explicit. Fixes #375.

woollybah %!s(int64=6) %!d(string=hai) anos
pai
achega
8d38b19146
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      expr.bmx

+ 2 - 2
expr.bmx

@@ -1462,11 +1462,11 @@ Type TCastExpr Extends TExpr
 			End If
 		End If
 		
-		If TArrayType(ty) And TObjectType(src) 
+		If TArrayType(ty) And TObjectType(src)
 			If TObjectType(src).classDecl.ident = "___Array" Then
 				exprType = ty
 				Return expr
-			Else If  TObjectType(src).classDecl.ident = "Object" Then
+			Else If TObjectType(src).classDecl.ident = "Object" And flags & CAST_EXPLICIT Then
 				exprType = ty
 				Return Self
 			End If