Selaa lähdekoodia

Allow static arrays of Structs.

Brucey 2 vuotta sitten
vanhempi
commit
300c6fa5ff
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      decl.bmx

+ 3 - 2
decl.bmx

@@ -750,8 +750,9 @@ Type TArgDecl Extends TLocalDecl
 				Err "Expecting array"
 				Err "Expecting array"
 			End If
 			End If
 			
 			
-			If Not TNumericType(TArrayType(ty).elemType) Then
-				Err "Static array elements must be numeric"
+			Local et:TType = TArrayType(ty).elemType
+			If Not TNumericType(et) And Not (TObjectType(et) And TObjectType(et).classDecl.IsStruct()) Then
+				Err "Static array elements must be numeric or a Struct"
 			End If
 			End If
 		End If
 		End If