Version Used:
I'm sorry for dumb question but how to tell?
Environment:
VisualStudio.16.Release/16.8.3+30804.86
Steps to Reproduce:
protected bool? IsNewResource() =>
Boolean.TryParse(GetHeader(HttpHeaders.NewResource), out var b) ? b : (bool?)default;
Expected Behavior:
No issue is reported.
Actual Behavior:
Modified code:
protected bool? IsNewResource() =>
Boolean.TryParse(GetHeader(HttpHeaders.NewResource), out var b) ? b : default as bool?;
doesn't compile:
CS8716 There is no target type for the default literal.
Version Used:
I'm sorry for dumb question but how to tell?
Environment:
Steps to Reproduce:
Expected Behavior:
No issue is reported.
Actual Behavior:
Modified code:
doesn't compile: