Skip to content

Verify pattern description with interactions with discards and tuples #936

@BillWagner

Description

@BillWagner

See #757 (comment)

In 17.2.2 we have:

Given a pattern input value e, if the simple_designation is the identifier _, it denotes a discard (§discards-new-clause) the value of e is not bound to anything. (Although a declared variable with the name _ may be in scope at that point, that named variable is not seen in this context.) If simple_designation is any other identifier, a local variable (§9.2.8) of the given type named by the given identifier is introduced. That local variable is assigned the value of the pattern input value when the pattern matches the value.

This may need modification (or even just links) now that the work for tuples and discards has been merged.

Deferred to post C# 7.


Associated WorkItem - 187390

Metadata

Metadata

Assignees

Labels

resolved: wontfixThe issue was examined, and we decided to live with it

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions