How to reproduce:
1. Open the attached project "Minimum Project To Reproduce The Bug.zip"
2. Build the project
Expected results: Build is successful
Actual results: Build fails with "error C2059: syntax error: ')'"
Reproducible with: 2021.3.10f1, 2022.1.17f1, 2022.2.0b8, 2023.1.0a11
Could not test with: 2020.3.40f1 (function pointers not available in C# 8.0)
Reproducible on: Windows 10