dotnet/roslyn
VS Immediate Window (expression compiler) ignores stamenents after semicolon
开放
#56,976 创建于 2021年10月6日
Area-InteractiveBughelp wanted
仓库指标
- 星标
- (20,414 个星标)
- PR 合并指标
- (平均合并 6天 17小时) (30 天内合并 256 个 PR)
描述
Version Used: Visual Studio 2019 v16.11.4.
Steps to Reproduce:
- Start debugging of any project.
- Enter any multi-statement line into the Immediate Window. For example,
int i = 3; i = 1337; - Press
Enter. - Enter the expression
iand pressEnteragain, to examine the current value of the variable.
Expected Behavior:
Immediate Window should execute every statement and tell me that i = 1337.
Actual Behavior:
int i = 3; i = 1337;
Expression has been evaluated and has no value
i
3

Notably, if I enter a slightly different statements:
i = 3; i = 1337;
then the expression compiler generates an error message:
error CS1073: Unexpected token ';'