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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a6