Skip to content

Commit

Permalink
Respond to PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
agocke committed Apr 25, 2019
1 parent b668661 commit a0bf84b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Compilers/CSharp/Portable/Binder/Binder_Patterns.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ internal BoundExpression ConvertPatternExpression(
if (inputType.ContainsTypeParameter())
{
convertedExpression = expression;
if (!hasErrors && expression.ConstantValue is {})
// If the expression does not have a constant value, an error will be reported in the caller
if (!hasErrors && expression.ConstantValue is object)
{
HashSet<DiagnosticInfo> useSiteDiagnostics = null;
if (expression.ConstantValue == ConstantValue.Null)
Expand Down

0 comments on commit a0bf84b

Please sign in to comment.