Beef
Beef copied to clipboard
[Crash] Segfault when calling GetEnumerator on IEnumerable with SizedArray and zero elements
using System;
using System.Collections;
namespace TryBeef;
class Program {
public static void Main(String[] args) {
void Fn<T, U>(T a) where T : IEnumerable<U>
{
Console.WriteLine("{}", a.GetEnumerator());
}
Console.WriteLine("{}", int[]().GetEnumerator());
Fn(int[](1,2,3));
// Fn(int[]()); // segfault
}
}
https://trybeef.netlify.app/#/Yoy8bi