Bizarre ternary operator behavior in debugger on x64 platform

走远了吗. 提交于 2019-12-01 15:14:29

Taking Eric Lippert's advice that this is probably a bug, I've filed an official Connect bug for this issue: https://connect.microsoft.com/VisualStudio/feedback/details/684202

Thanks everyone for your feedback!

UPDATE: They got back to me and said they've fixed this corner case in the next version of the compiler. Hooray! :)

to me this doesn't seem a bug in the debugger but possibly of the compiler...

when changing the code to

{ helperClass.SomeData = helperClass.HasData ? GetSomeData() : GetSomeOtherData(); }

the IL generated is different and the debugger works as expected...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!