Pattern match variable scope
问题 In the Roslyn Pattern Matching spec it states that: The scope of a pattern variable is as follows: If the pattern appears in the condition of an if statement, its scope is the condition and controlled statement of the if statement, but not its else clause. However the latest Microsoft "What's new" posts and presentations are showing this example: public void PrintStars(object o) { if (o is null) return; // constant pattern "null" if (!(o is int i)) return; // type pattern "int i" WriteLine