generated from AArnott/Library.Template
-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Looking at https://github.com/AArnott/CSharpIsNull/blob/main/src/CSharpIsNullAnalyzer/CSIsNull001.cs and https://github.com/AArnott/CSharpIsNull/blob/main/src/CSharpIsNullAnalyzer/CSIsNull002.cs, I didn't see anything checking for this.
using System;
using System.Linq.Expressions;
// ❌ CS8122 An expression tree may not contain an 'is' pattern-matching operator.
// ↓↓↓↓↓↓↓↓↓
_ = (Expression<Func<string, bool>>)(s => s is null);
// ❌ CS8122 An expression tree may not contain an 'is' pattern-matching operator.
// ↓↓↓↓↓↓↓↓↓↓↓↓↓
_ = (Expression<Func<string, bool>>)(s => s is not null);
_ = (Expression<Func<string, bool>>)(s => s is object); // WorksAArnott
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working