Skip to content

remove pattern matching specs #34945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .openpublishing.redirection.csharp.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
"source_path_from_root": "/redirections/proposals/csharp-7.0/out-var.md",
"redirect_url": "/dotnet/csharp/language-reference/language-specification/expressions.md#1117-declaration-expressions"
},
{
"source_path_from_root": "/redirections/proposals/csharp-7.0/pattern-matching.md",
"redirect_url": "/dotnet/csharp/language-reference/language-specification/patterns.md"
},
{
"source_path_from_root": "/redirections/proposals/csharp-7.1/async-main.md",
"redirect_url": "/dotnet/csharp/language-reference/language-specification/basic-concepts#71-application-startup"
Expand All @@ -32,6 +36,10 @@
"source_path_from_root": "/redirections/proposals/csharp-7.1/infer-tuple-names.md",
"redirect_url": "/dotnet/csharp/language-reference/language-specification/types.md#8311-tuple-types"
},
{
"source_path_from_root": "/redirections/proposals/csharp-7.1/generics-pattern-match.md",
"redirect_url": "/dotnet/csharp/language-reference/language-specification/patterns.md"
},
{
"source_path_from_root": "/redirections/proposals/csharp-7.2/private-protected.md",
"redirect_url": "/dotnet/csharp/language-reference/language-specification/classes.md#1436-access-modifiers"
Expand Down
14 changes: 4 additions & 10 deletions docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
{
"files": [
"csharp-7.0/*.md",
"csharp-7.1/*.md",
"csharp-7.2/*.md",
"csharp-7.3/*.md",
"csharp-8.0/*.md",
Expand All @@ -75,9 +74,8 @@
"csharp-7.0/tuples.md",
"csharp-7.0/value-task.md",
"csharp-7.0/out-var.md",
"csharp-7.1/async-main.md",
"csharp-7.1/target-typed-default.md",
"csharp-7.1/infer-tuple-names.md",
"csharp-7.0/pattern-matching.md",

"csharp-7.2/leading-separator.md",
"csharp-7.2/readonly-struct.md",
"csharp-7.2/ref-struct-and-span.md",
Expand Down Expand Up @@ -508,7 +506,6 @@
"ms.date": {
"_csharpstandard/standard/*.md": "01/10/2021",
"_csharplang/proposals/csharp-7.0/*.md": "08/13/2018",
"_csharplang/proposals/csharp-7.1/*.md": "02/16/2018",
"_csharplang/proposals/csharp-7.2/*.md": "01/19/2019",
"_csharplang/proposals/csharp-7.3/*.md": "11/25/2018",
"_csharplang/proposals/csharp-8.0/*.md": "09/10/2019",
Expand Down Expand Up @@ -638,6 +635,7 @@
"_csharpstandard/standard/types.md": "Types",
"_csharpstandard/standard/variables.md": "Variables",
"_csharpstandard/standard/conversions.md": "Conversions",
"_csharpstandard/standard/patterns.md": "Patterns and pattern matching",
"_csharpstandard/standard/expressions.md": "Expressions",
"_csharpstandard/standard/statements.md": "Statements",
"_csharpstandard/standard/namespaces.md": "Namespaces",
Expand All @@ -655,9 +653,7 @@
"_csharpstandard/standard/standard-library.md": "Standard library",
"_csharpstandard/standard/documentation-comments.md": "Documentation comments",
"_csharpstandard/standard/Bibliography.md": "Bibliography",
"_csharplang/proposals/csharp-7.0/pattern-matching.md": "Pattern matching",
"_csharplang/proposals/csharp-7.0/task-types.md": "Async task types",
"_csharplang/proposals/csharp-7.1/generics-pattern-match.md": "Pattern matching with generics",
"_csharplang/proposals/csharp-7.2/readonly-ref.md": "Readonly references",
"_csharplang/proposals/csharp-7.2/span-safety.md": "Compile time safety for ref-like types",
"_csharplang/proposals/csharp-7.2/conditional-ref.md": "Conditional ref",
Expand Down Expand Up @@ -755,6 +751,7 @@
"_csharpstandard/standard/types.md": "This chapter defines value types, reference types, generic types and other program entities. Concepts such as assemblies, namespaces, classes, interfaces and structs are defined.",
"_csharpstandard/standard/variables.md": "This chapter covers variable categories, default values, definite assignment, and variable references.",
"_csharpstandard/standard/conversions.md": "This chapter covers the possible conversions from one type to another in C#. Builtin conversions, user defined conversions, implicit and explicit conversions are defined.",
"_csharpstandard/standard/patterns.md": "This chapter covers patterns and patttern matching. A pattern is a syntactic form that can be tested against an expression. Control flow can be achieved by matching against different patterns.",
"_csharpstandard/standard/expressions.md": "This chapter covers operators and expressions. Expressions form several groups, including primary expressions, unary operators, arithmetic operators, relational and type testing operators, and logical operators.",
"_csharpstandard/standard/statements.md": "This chapter covers statements in C#. Each statement is defined, as are statement blocks, statement reachability, and end points.",
"_csharpstandard/standard/namespaces.md": "This chapter defines namespaces, including how to declare them and how to use them.",
Expand All @@ -772,9 +769,7 @@
"_csharpstandard/standard/standard-library.md": "This appendix lists requirements of the standard library. The C# language relies on these types for some of its behavior.",
"_csharpstandard/standard/documentation-comments.md": "This appendix describes XML comments that are used to document your program.",
"_csharpstandard/standard/Bibliography.md": "This appendix lists external standards referenced in this specification.",
"_csharplang/proposals/csharp-7.0/pattern-matching.md": "This feature specification describes the pattern matching featues added in C# 7.0. Note that future releases built on this initial set of features.",
"_csharplang/proposals/csharp-7.0/task-types.md": "This feature specification describes the syntax to support async return types that match a pattern, rather than restricting them to Task.",
"_csharplang/proposals/csharp-7.1/generics-pattern-match.md": "This feature specification describes syntax enhancements to enable pattern matching with generic types.",
"_csharplang/proposals/csharp-7.2/readonly-ref.md": "This feature specification describes how to create readonly references to variables. This includes the 'readonly' modifier on variables, and the 'in' modifier on parameters and arguments.",
"_csharplang/proposals/csharp-7.2/span-safety.md": "This feature specification describes the rules that govern 'ref struct' declarations and their use.",
"_csharplang/proposals/csharp-7.2/conditional-ref.md": "This feature specification describes the syntax enhancements for using 'ref' with '?:' expressions",
Expand Down Expand Up @@ -860,7 +855,6 @@
"titleSuffix": {
"_csharpstandard/standard/*.md": "C# language specification",
"_csharplang/proposals/csharp-7.0/*.md": "C# 7.0 draft feature specifications",
"_csharplang/proposals/csharp-7.1/*.md": "C# 7.1 draft feature specifications",
"_csharplang/proposals/csharp-7.2/*.md": "C# 7.2 draft feature specifications",
"_csharplang/proposals/csharp-7.3/*.md": "C# 7.3 draft feature specifications",
"_csharplang/proposals/csharp-8.0/*.md": "C# 8.0 draft feature specifications",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Many attributes have parameters, which can be positional, unnamed, or named. Any

The first parameter, the DLL name, is positional and always comes first; the others are named. In this case, both named parameters default to false, so they can be omitted. Positional parameters correspond to the parameters of the attribute constructor. Named or optional parameters correspond to either properties or fields of the attribute. Refer to the individual attribute's documentation for information on default parameter values.

For more information on allowed parameter types, see the [Attributes](~/_csharpstandard/standard/attributes.md#2124-attribute-parameter-types) section of the [C# language specification](~/_csharpstandard/standard/README.md)
For more information on allowed parameter types, see the [Attributes](~/_csharpstandard/standard/attributes.md#2224-attribute-parameter-types) section of the [C# language specification](~/_csharpstandard/standard/README.md)

### Attribute targets

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ The following example shows the behavior of an async event handler. In the examp

An async method can return any type that has an accessible `GetAwaiter` method that returns an instance of an *awaiter type*. In addition, the type returned from the `GetAwaiter` method must have the <xref:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute?displayProperty=nameWithType> attribute. You can learn more in the article on [Attributes read by the compiler](../language-reference/attributes/general.md#asyncmethodbuilder-attribute) or the feature spec for [Task like return types](~/_csharplang/proposals/csharp-7.0/task-types.md).

This feature is the complement to [awaitable expressions](~/_csharpstandard/standard/expressions.md#11982-awaitable-expressions), which describes the requirements for the operand of `await`. Generalized async return types enable the compiler to generate `async` methods that return different types. Generalized async return types enabled performance improvements in the .NET libraries. Because <xref:System.Threading.Tasks.Task> and <xref:System.Threading.Tasks.Task%601> are reference types, memory allocation in performance-critical paths, particularly when allocations occur in tight loops, can adversely affect performance. Support for generalized return types means that you can return a lightweight value type instead of a reference type to avoid additional memory allocations.
This feature is the complement to [awaitable expressions](~/_csharpstandard/standard/expressions.md#12982-awaitable-expressions), which describes the requirements for the operand of `await`. Generalized async return types enable the compiler to generate `async` methods that return different types. Generalized async return types enabled performance improvements in the .NET libraries. Because <xref:System.Threading.Tasks.Task> and <xref:System.Threading.Tasks.Task%601> are reference types, memory allocation in performance-critical paths, particularly when allocations occur in tight loops, can adversely affect performance. Support for generalized return types means that you can return a lightweight value type instead of a reference type to avoid additional memory allocations.

.NET provides the <xref:System.Threading.Tasks.ValueTask%601?displayProperty=nameWithType> structure as a lightweight implementation of a generalized task-returning value. To use the <xref:System.Threading.Tasks.ValueTask%601?displayProperty=nameWithType> type, you must add the `System.Threading.Tasks.Extensions` NuGet package to your project. The following example uses the <xref:System.Threading.Tasks.ValueTask%601> structure to retrieve the value of two dice rolls.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Add new properties to the exception class when the data they provide is useful t

## C# Language Specification

For more information, see [Exceptions](~/_csharpstandard/standard/exceptions.md) and [The throw statement](~/_csharpstandard/standard/statements.md#12106-the-throw-statement) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage.
For more information, see [Exceptions](~/_csharpstandard/standard/exceptions.md) and [The throw statement](~/_csharpstandard/standard/statements.md#13106-the-throw-statement) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage.

## See also

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ In the following example, the `finally` block is used to close a file that is op

## C# Language Specification

For more information, see [Exceptions](~/_csharpstandard/standard/exceptions.md) and [The try statement](~/_csharpstandard/standard/statements.md#1211-the-try-statement) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage.
For more information, see [Exceptions](~/_csharpstandard/standard/exceptions.md) and [The try statement](~/_csharpstandard/standard/statements.md#1311-the-try-statement) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage.

## See also

Expand Down
6 changes: 3 additions & 3 deletions docs/csharp/language-reference/builtin-types/enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ For any enumeration type, there exist [boxing and unboxing](../../programming-gu
For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md):

- [Enums](~/_csharpstandard/standard/enums.md)
- [Enum values and operations](~/_csharpstandard/standard/enums.md#186-enum-values-and-operations)
- [Enumeration logical operators](~/_csharpstandard/standard/expressions.md#11133-enumeration-logical-operators)
- [Enumeration comparison operators](~/_csharpstandard/standard/expressions.md#11126-enumeration-comparison-operators)
- [Enum values and operations](~/_csharpstandard/standard/enums.md#196-enum-values-and-operations)
- [Enumeration logical operators](~/_csharpstandard/standard/expressions.md#12133-enumeration-logical-operators)
- [Enumeration comparison operators](~/_csharpstandard/standard/expressions.md#12126-enumeration-comparison-operators)
- [Explicit enumeration conversions](~/_csharpstandard/standard/conversions.md#1033-explicit-enumeration-conversions)
- [Implicit enumeration conversions](~/_csharpstandard/standard/conversions.md#1024-implicit-enumeration-conversions)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Instead use the <xref:System.Nullable.GetUnderlyingType%2A?displayProperty=nameW
For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md):

- [Nullable types](~/_csharpstandard/standard/types.md#8312-nullable-value-types)
- [Lifted operators](~/_csharpstandard/standard/expressions.md#1148-lifted-operators)
- [Lifted operators](~/_csharpstandard/standard/expressions.md#1248-lifted-operators)
- [Implicit nullable conversions](~/_csharpstandard/standard/conversions.md#1026-implicit-nullable-conversions)
- [Explicit nullable conversions](~/_csharpstandard/standard/conversions.md#1034-explicit-nullable-conversions)
- [Lifted conversion operators](~/_csharpstandard/standard/conversions.md#1062-lifted-conversions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A generic struct may be the source of both unmanaged and managed constructed typ

## C# language specification

For more information, see the [Pointer types](~/_csharpstandard/standard/unsafe-code.md#223-pointer-types) section of the [C# language specification](~/_csharpstandard/standard/README.md).
For more information, see the [Pointer types](~/_csharpstandard/standard/unsafe-code.md#233-pointer-types) section of the [C# language specification](~/_csharpstandard/standard/README.md).

## See also

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Invalid rank specifier: expected ',' or ']'

- A comma enclosed in brackets

For more information, see [Arrays](../../programming-guide/arrays/index.md) and the C# specification ([C# Language Specification](~/_csharpstandard/standard/arrays.md#167-array-initializers)) section on array initializers.
For more information, see [Arrays](../../programming-guide/arrays/index.md) and the C# specification ([C# Language Specification](~/_csharpstandard/standard/arrays.md#177-array-initializers)) section on array initializers.

## Example

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ This section describes the keywords you can use when declaring method parameters

- [C# Reference](../index.md)
- [C# Keywords](./index.md)
- [Argument lists](~/_csharpstandard/standard/expressions.md#1162-argument-lists) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage.
- [Argument lists](~/_csharpstandard/standard/expressions.md#1262-argument-lists) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You can also use the `new` keyword to [create an instance of a type](../operator

## C# language specification

For more information, see the [Type parameter constraints](~/_csharpstandard/standard/classes.md#1425-type-parameter-constraints) section of the [C# language specification](~/_csharpstandard/standard/README.md).
For more information, see the [Type parameter constraints](~/_csharpstandard/standard/classes.md#1525-type-parameter-constraints) section of the [C# language specification](~/_csharpstandard/standard/README.md).

## See also

Expand Down
4 changes: 2 additions & 2 deletions docs/csharp/language-reference/keywords/new-modifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ In this example, `BaseC.Invoke` is hidden by `DerivedC.Invoke`. The field `x` is

Name hiding through inheritance takes one of the following forms:

- Generally, a constant, field, property, or type that is introduced in a class or struct hides all base class members that share its name. There are special cases. For example, if you declare a new field with name `N` to have a type that is not invocable, and a base type declares `N` to be a method, the new field does not hide the base declaration in invocation syntax. For more information, see the [Member lookup](~/_csharpstandard/standard/expressions.md#115-member-lookup) section of the [C# language specification](~/_csharpstandard/standard/README.md).
- Generally, a constant, field, property, or type that is introduced in a class or struct hides all base class members that share its name. There are special cases. For example, if you declare a new field with name `N` to have a type that is not invocable, and a base type declares `N` to be a method, the new field does not hide the base declaration in invocation syntax. For more information, see the [Member lookup](~/_csharpstandard/standard/expressions.md#125-member-lookup) section of the [C# language specification](~/_csharpstandard/standard/README.md).

- A method introduced in a class or struct hides properties, fields, and types that share that name in the base class. It also hides all base class methods that have the same signature.

Expand Down Expand Up @@ -48,7 +48,7 @@ The keyword new is required on 'MyDerivedC.x' because it hides inherited member

## C# language specification

For more information, see [The new modifier](~/_csharpstandard/standard/classes.md#1435-the-new-modifier) section of the [C# language specification](~/_csharpstandard/standard/README.md).
For more information, see [The new modifier](~/_csharpstandard/standard/classes.md#1535-the-new-modifier) section of the [C# language specification](~/_csharpstandard/standard/README.md).

## See also

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/language-reference/keywords/override.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ This example defines a base class named `Employee`, and a derived class named `S

## C# language specification

For more information, see the [Override methods](~/_csharpstandard/standard/classes.md#1465-override-methods) section of the [C# language specification](~/_csharpstandard/standard/README.md).
For more information, see the [Override methods](~/_csharpstandard/standard/classes.md#1565-override-methods) section of the [C# language specification](~/_csharpstandard/standard/README.md).

For more information about covariant return types, see the [feature proposal note](~/_csharplang/proposals/csharp-9.0/covariant-returns.md).

Expand Down
Loading