Browse Source

Cast to array should be explicit. Fixes #375.

woollybah 6 năm trước cách đây
mục cha
commit
8d38b19146
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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