Back to Roslyn

Wildcards.Work

docs/features/wildcards.work.md

11.0.1002.0 KB
Original Source

work items remaining for wildcards

Specs

  • Gather together a specification document
    • Language behavior (e.g. this and this and this)
    • SemanticModel behavior (see also here)
    • Warnings (for expression variables declared but not used)
    • Debugging (value discarded is not visible in debugger)

Compiler

  • Syntax model changes
  • Symbol changes
  • Parsing for the short-form wildcard pattern _
  • Implement binding of wildcards
    • In a pattern
    • In a deconstruction declaration
    • In a deconstruction assignment expression
    • In an out argument (in every argument context)
    • Both the long form var _ and the short form _
  • Type inference for wildcards in each context
  • Implement semantic model changes
    • GetTypeInfo of a wildcard expression _ should be the type of the discarded value
    • GetSymbolInfo of a wildcard expression _ should be an IDiscardedSymbol
  • Implement lowering of wildcards
    • In a pattern
    • In a deconstruction declaration
    • In a deconstruction assignment expression
    • In an out argument (in each argument context)

Testing

  • Symbol tests
  • Syntax tests
  • SemanticModel tests
  • Language static semantic tests
  • Runtime behavioral tests
  • PDB tests
  • Scripting tests
  • EE tests
  • In a pattern context
  • In a deconstruction declaration context
  • In a deconstruction assignment expression context
  • In an out argument (in every argument context)
  • Both the long form var _ and the short form _, where permitted
  • In the long/short form when there is/not a conflicting name in scope