vrchat-community / UdonSharp

A compiler for compiling C# to Udon assembly
https://udonsharp.docs.vrchat.com
MIT License
461 stars 50 forks source link

Using discards is not supported #162

Open Happyrobot33 opened 2 months ago

Happyrobot33 commented 2 months ago

Describe the bug in detail: When you have a method that defines a out parameter, like MyCoolMethod(out string myString), then the normal way to call it if you don't want the value of the out, is to do this MyCoolMethod(out _). The issue is this does not work, and the compiler complains about a missing symbol _. Having this fixed would be nice, as otherwise right now you need to assign it to a random variable in your source and it looks a bit messy. The only current workaround is essentially MyCoolMethod(out string DISCARD)