Beef icon indicating copy to clipboard operation
Beef copied to clipboard

Compiler.Mixin inside Comptime method crashes the compiler

Open disarray2077 opened this issue 1 year ago • 0 comments

The code below crashes the compiler when it's compiling. This seems like something that was working before. I hope this isn't caused by something else in my project. 🙏

class Program
{
	[Comptime]
	public static void Test<T>()
	{
		if (typeof(T).IsGenericParam)
			return;

		Compiler.Mixin("// Beef!");
	}

	public static void Main()
	{
		Test<Program>();

		Console.Read();
	}
}

Crash screenshot: image

Tested with: https://github.com/beefytech/Beef/commit/aa4f9f7dfa8f2ad81a6807b87192516d0ce72a1a

disarray2077 avatar May 13 '24 19:05 disarray2077