Beef icon indicating copy to clipboard operation
Beef copied to clipboard

[Crash] Cannot cast nullable function param

Open farism opened this issue 3 years ago • 0 comments

using System;

namespace TryBeef;

class Program {
	public static void Main(String[] args) {
		void Fn(float? a) {
			let b = (double?)a;  // crashes IDE when compiling
		}

		float? a = 0;
		let b = (double?)a; // this works

	        Console.WriteLine(b);
	}
}

https://trybeef.netlify.app/#/giHPmS

nullable_float_param_cast_to_nullable_double.zip

farism avatar Oct 22 '22 07:10 farism