Beef
Beef copied to clipboard
[Crash] Initialization of fixed-sized arrays with user-defined incorrect size
Hi there,
Setting incorrect size of the fixed-size array causes IDE to crash. Adding new or scope in current case also crashes IDE, even if size equals to count of predefined items.
Version 0.43.4 built 9/7/2022 at 1:50 PM
namespace TestProject;
public static class Program
{
static void Main ()
{
// Works
uint32[?] something = uint32[3](123, 456, 789);
// Crashes
uint32[?] something = uint32[2](123, 456, 789);
uint32[?] something = new uint32[3](123, 456, 789);
uint32[?] something = scope uint32[3](123, 456, 789);
// Works (shows 'too many initializers, expected 1 fewer' which is expected)
uint32[] something = scope uint32[2](123, 456, 789);
}
}