Beef icon indicating copy to clipboard operation
Beef copied to clipboard

[BUG] Inconsistent SkipCallAttribute behavior

Open Fusioon opened this issue 2 years ago • 0 comments

Methods in static block marked with SkipCall attribute generate Illegal SkipCall invocation error.

Code to reproduce:

public static class Foo
{
	[SkipCall]
	public static void Assert(bool condition)
	{
		
	}
}

static
{
	[SkipCall]
	public static void GlobalAssert(bool condition)
	{

	}
}

class Program
{
	static void Main()
	{
		bool b = false;
		Foo.Assert(b == false);		// Works
		GlobalAssert(false);		// Works but not very useful
		GlobalAssert(b == false);	// Error: Illegal SkipCall invocation
	}
}

Tested with: Nightly 05/08/2023

Fusioon avatar May 19 '23 16:05 Fusioon