Beef icon indicating copy to clipboard operation
Beef copied to clipboard

[Crash] Initialization of fixed-sized arrays with user-defined incorrect size

Open kallisto56 opened this issue 3 years ago • 0 comments

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);
    }
}

kallisto56 avatar Oct 03 '22 02:10 kallisto56