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
- Crash on DynamicHeapAllocator::CreateTLSFBlock when opening a specific project
- Scene flickers when using Mesh Output with SpriteLit Shader in 2D project
- “Cache Management” text is misaligned in Preferences > Package Manager
- [macOS] network permission shows the name of previously closed app when different app requests network access
- Delta value returned by mouse movementsMonitor is different when changing Screen Resolution
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a6