UdonSharp icon indicating copy to clipboard operation
UdonSharp copied to clipboard

Don't COW the internal `this` constant

Open bdunderscore opened this issue 3 years ago • 0 comments

Certain ternary expressions could result in COWing the internal this constant unnecessarily. Mark this as constant to avoid this.

Because this hides another bug, I've added a (currently failing) test that detects the more general case of inappropriate COWing across ternary operators. I've not added it to the scene because I'm sure the merge will be a nightmare (and it's failing until some of Merlin's working branch changes land)

bdunderscore avatar Dec 09 '21 03:12 bdunderscore