When REDIM is used for [re]sizing an array, it constructs the new array elements without checking the right of access to the default constructor.
Example:
Type UDT
Public:
Dim As Integer I = 123
Private:
Declare Constructor ()
End Type
Constructor UDT ()
Print "Private access!"
End Constructor
'Dim As UDT u1 '' OK - error 204: The default constructor has no public access
'Dim As UDT u2(0) '' OK - error 204: The default constructor has no public access
'Dim As UDT Ptr pu1 = New UDT '' OK - error 204: The default constructor has no public access
Dim AS UDT u3() '' OK - Because no construction
Redim u3(0) '' NOK - The default constructor has no public access
Print u3(0).I
Print
Redim As UDT u4(0) '' NOK - The default constructor has no public access
Print u4(0).I
Sleep
fixed in [975f41]
REDIM [PRESERVE]will check access rightsRelated
Commit: [975f41]