Beef icon indicating copy to clipboard operation
Beef copied to clipboard

"Unreachable code" is reachable.

Open disarray2077 opened this issue 2 years ago • 0 comments

Example code:

public static U TryCast<T, U>(T val)
	where T : class
	where U : class
{
	if (let casted = val as U)
		return casted;

	return null; // WARNING: Unreachable code.
}

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

disarray2077 avatar May 01 '23 17:05 disarray2077