소스 검색

Allow static arrays of Structs.

Brucey 2 년 전
부모
커밋
300c6fa5ff
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      decl.bmx

+ 3 - 2
decl.bmx

@@ -750,8 +750,9 @@ Type TArgDecl Extends TLocalDecl
 				Err "Expecting array"
 			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