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
- NavMeshModifier.OnEnable/OnDisable gets progressively slower when called repeatedly
- "System.Net.CookieContainer" throws an "ArgumentException" error when using a non-UTF-8 machine locale and hostname
- Crash on ModelImporter::ImportSkinnedMesh when disabling "Strip Bones" on a specific FBX model
- WebGL Development builds ignore the "Compression Format" setting when using "Gzip" compression
- [tvOS] Project crashes on startup on Apple TV simulator (both X86_64 and ARM64 architectures)
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a6