@@ -1014,7 +1014,7 @@ Type TParser Extends TGenProcessor
' array or function pointer?
Repeat
- If (_toke = "[" Or _toke = "[]") And IsArrayDef() Then
+ If (_toke = "[" Or _toke = "[]") And (IsArrayDef() Or IsArrayDef(attr & DECL_STATIC > 0)) Then
If Not IsArrayDef(attr & DECL_STATIC > 0) Then
Err "Invalid static array initialization."
Else
@@ -148,6 +148,9 @@ Type TAssignStmt Extends TStmt
Err "Cannot modify ReadOnly variable " + decl.ident
End If
+ If TValDecl(decl) And TArrayType(TValDecl(decl).ty) And TArrayType(TValDecl(decl).ty).isStatic Then
+ Err "Static arrays cannot be assigned in this way."
+ End If
If IsPointerType(lhs.exprType, 0, TType.T_POINTER | TType.T_VARPTR) And TNumericType(rhs.exprType) Then