Search Issue Tracker
Fixed in 2021.2.X
Votes
0
Found in
2020.2
2020.2.0f1
2021.1
2021.2
Issue ID
1303638
Regression
No
error CS8352 when trying to return a copy of a ref struct due to an outdated build of Roslyn
How to reproduce:
1. Open the attached project "RoslynCompilerBug.zip"
2. See the Console window
Expected result: No errors
Actual result: error CS8352: Cannot use local 'value' in this context because it may expose referenced variables outside of their declaration scope
Reproducible with - 2020.2.3f1, 2021.1.0a3, 2021.2.0b3
Could not test (scripting errors) - 2018.4, 2019.4
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Editor crashes on StoredGraphicsBuffer::GetGfxBufferID when VFX Graph property is modified during Play Mode and Application.targetFrameRate is used to limit FPS
- Crash on NVAPI_Thunk when changing Player resolution while HDR display is used and Direct3D12 is set as the graphics API
- Only one out of multiple cameras is shown in the Play Mode while HDR display is used and Direct3D12 is set as the graphics API
- The "Paste Component as New" option is incorrectly displayed as active despite the action being prohibited
- "TLS Allocator ALLOC_TEMP_TLS" errors are thrown when unsuccessfully importing an FBX file
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a6