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

[C# Feature Request] Better inference for Nullable<T> in conditional operator ?: #5120

Closed
dsaf opened this issue Sep 10, 2015 · 2 comments
Closed

Comments

@dsaf
Copy link

dsaf commented Sep 10, 2015

I have a feeling that it was submitted before, but couldn't find it.

Current situation:

bool someCondition = true;
int? index = someCondition ? 123 : (int?)null;

Better inference:

bool someCondition = true;
int? index = someCondition ? 123 : null;
@MrJul
Copy link
Contributor

MrJul commented Sep 10, 2015

Already submitted indeed :) #438

@dsaf
Copy link
Author

dsaf commented Sep 10, 2015

Thanks :).

@dsaf dsaf closed this as completed Sep 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants