Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline Temporary fails to simplify global:: in top-level statements #44420

Closed
sharwell opened this issue May 20, 2020 · 0 comments · Fixed by #60275
Closed

Inline Temporary fails to simplify global:: in top-level statements #44420

sharwell opened this issue May 20, 2020 · 0 comments · Fixed by #60275

Comments

@sharwell
Copy link
Member

Steps to Reproduce:

Inline val2:

int val = 0;
int val2 = val + 1;
System.Console.WriteLine(val2);

Expected Behavior:

int val = 0;
System.Console.WriteLine(val + 1);

Actual Behavior:

int val = 0;
global::System.Console.WriteLine(val + 1);

Additional Notes:

When the reducer compares the bound symbols for global::System.Console.WriteLine (original semantic model) and System.Console.WriteLine (speculative semantic model), the former is binding to WriteLine(int) but the latter is reporting an overload resolution failure with 19 candidates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants