Using stackalloc span in if statement
Hi I’m trying to use a span allocated on the stack of the function but it fails unless I reference the stack outside of an if statement. An example of this compiler error can be seen at https://sharplab.io/#v2:D4AQTAjAsAUCAMACEEB0BJA8gblrEAzMmIgMKIDesiNyRIALIgLIAUAlJdbTwEoCmAQwAmmAHYAbAJ4BlAA6CxAHgDGAC0EAnAHyJhAS00z+CzYIAuAe02kNmgM6IAvIgDa3Hp8QAFC2tQAIob8KlaasiZaFta2WgA0Hl60vub+AIIS5kGaIWERptE2dok8ALq4MEmIAiLi0vKKqna6CqnOiABEqN0dFVUltABm1kLqiKy8igDm/Ij2/FMAtvxi5oj6Yoit/vIS+uasKf5HxgVh7OwDNFSVVbQ1opKyCsrqWror5uHt267zS59yldPPpBuMAISsT7hVAAGRWUzaThcEEQADI0YhoVJXPBSs4XAByAD0hIuwJ4NzuSWx7WxqAAKpp9IsAKJiYSsAxGSJmMKxBzsPrUxAAXwptAlNBQAE4oasYQzLDIvhsphwhcDxbcaNrRUA=
Is this at all possible to achieve?
Is this at all possible to achieve?
C#/VB/F# compiler playground.