Skip to content

Commit 743aecf

Browse files
[create-pull-request] automated change (#675)
Co-authored-by: jskeet <[email protected]>
1 parent ae45601 commit 743aecf

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

standard/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@
184184
- [§10.2.12](conversions.md#10212-implicit-conversions-involving-type-parameters) Implicit conversions involving type parameters
185185
- [§10.2.13](conversions.md#10213-user-defined-implicit-conversions) User-defined implicit conversions
186186
- [§10.2.14](conversions.md#10214-anonymous-function-conversions-and-method-group-conversions) Anonymous function conversions and method group conversions
187-
- [§10.2.15](conversions.md#10215-implicit-throw-conversions) Implicit throw conversions
187+
- [§10.2.15](conversions.md#10215-default-literal-conversions) Default literal conversions
188+
- [§10.2.16](conversions.md#10216-implicit-throw-conversions) Implicit throw conversions
188189
- [§10.3](conversions.md#103-explicit-conversions) Explicit conversions
189190
- [§10.3.1](conversions.md#1031-general) General
190191
- [§10.3.2](conversions.md#1032-explicit-numeric-conversions) Explicit numeric conversions

standard/conversions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,11 @@ A user-defined implicit conversion consists of an optional standard implicit con
310310
311311
Anonymous functions and method groups do not have types in and of themselves, but they may be implicitly converted to delegate types. Additionally, some lambda expressions may be implicitly converted to expression tree types. Anonymous function conversions are described in more detail in [§10.7](conversions.md#107-anonymous-function-conversions) and method group conversions in [§10.8](conversions.md#108-method-group-conversions).
312312
313-
### §default-literal-new-clause Default literal conversions
313+
### 10.2.15 Default literal conversions
314314
315315
An implicit conversion exists from a *default_literal* ([§11.7.19](expressions.md#11719-default-value-expressions)) to any type. This conversion produces the default value ([§9.3](variables.md#93-default-values)) of the inferred type.
316316
317-
### 10.2.15 Implicit throw conversions
317+
### 10.2.16 Implicit throw conversions
318318
319319
While throw expressions do not have a type, they may be implicitly converted to any type.
320320

standard/expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2878,7 +2878,7 @@ default_literal
28782878
;
28792879
```
28802880
2881-
A *default_literal* represents a default value ([§9.3](variables.md#93-default-values)). It does not have a type, but can be converted to any type through a default literal conversion (§default-literal-new-clause).
2881+
A *default_literal* represents a default value ([§9.3](variables.md#93-default-values)). It does not have a type, but can be converted to any type through a default literal conversion ([§10.2.15](conversions.md#10215-default-literal-conversions)).
28822882

28832883
The result of a *default_value_expression* is the default ([§9.3](variables.md#93-default-values)) of the explicit type in an *explictly_typed_default*, or the target type of the conversion for a *default_value_expression*.
28842884

standard/grammar.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,9 +1060,18 @@ unchecked_expression
10601060
10611061
// Source: §11.7.19 Default value expressions
10621062
default_value_expression
1063+
: explictly_typed_default
1064+
| default_literal
1065+
;
1066+
1067+
explictly_typed_default
10631068
: 'default' '(' type ')'
10641069
;
10651070
1071+
default_literal
1072+
: 'default'
1073+
;
1074+
10661075
// Source: §11.7.20 Nameof expressions
10671076
nameof_expression
10681077
: 'nameof' '(' named_entity ')'

0 commit comments

Comments
 (0)