瀏覽代碼

Cast to array should be explicit. Fixes #375.

woollybah 6 年之前
父節點
當前提交
8d38b19146
共有 1 個文件被更改,包括 2 次插入2 次删除
  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