Skip to content

Commit 09ec8a4

Browse files
committed
Resolve merge conflicts
2 parents b28f1af + db36646 commit 09ec8a4

File tree

22 files changed

+160
-51
lines changed

22 files changed

+160
-51
lines changed

.github/workflows/do-not-merge-label-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
- name: 'Check "${{ matrix.label }}" label'
3030
run: |
31-
echo "::notice::Merging permission is diabled for PRs when the '${{ matrix.label }}' label is applied."
31+
echo "::notice::Merging permission is disabled for PRs when the '${{ matrix.label }}' label is applied."
3232
3333
if [ "${{ contains(github.event.pull_request.labels.*.name, matrix.label) }}" = "true" ]; then
3434
echo "::error::Pull request is labeled as '${{ matrix.label }}'. Please remove the label before merging."

.github/workflows/grammar-validator.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ name: ANTLR Grammar validator
44
on:
55
pull_request:
66
types: [opened, synchronize, reopened]
7+
paths:
8+
- "standard/**"
9+
- "tools/GrammarTesting/**"
10+
- "tools/validate-grammar.sh"
11+
- ".github/workflows/dependencies/GrammarTestingEnv.tgz"
712
workflow_dispatch:
813
inputs:
914
reason:

.github/workflows/renumber-sections.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ name: Renumber standard TOC
44
on:
55
pull_request:
66
types: [opened, synchronize, reopened]
7+
paths:
8+
- "standard/**"
9+
- "tools/StandardAnchorTags/**"
10+
- "tools/run-section-renumber.sh"
711
workflow_dispatch:
812
inputs:
913
reason:

.github/workflows/test-examples.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
types: [opened, synchronize, reopened]
77
paths:
88
- "standard/*.md"
9+
- "tools/example-templates/**"
10+
- "tools/ExampleExtractor/**"
11+
- "tools/ExampleTester/**"
12+
- "tools/Utilities/**"
13+
- "tools/test-examples.sh"
914
workflow_dispatch:
1015
inputs:
1116
reason:

.github/workflows/tools-tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ on:
55
pull_request:
66
types: [opened, synchronize, reopened]
77
paths:
8-
- '**.cs'
9-
- '**.csproj'
10-
- '**.sln'
8+
- 'tools/**.cs'
9+
- 'tools/**.csproj'
10+
- 'tools/**.sln'
1111
workflow_dispatch:
1212
inputs:
1313
reason:

.github/workflows/word-converter.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ name: Word Converter
44
on:
55
pull_request:
66
types: [opened, synchronize, reopened]
7+
paths:
8+
- "standard/**"
9+
- "tools/MarkdownConverter/**"
10+
- "tools/run-converter.sh"
711
workflow_dispatch:
812
inputs:
913
reason:

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,3 @@ test-grammar/
360360

361361
# don't checkin jar files:
362362
*.jar
363-
364-
# don't checkin launchSettings:
365-
**/launchSettings.json

standard/README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -644,16 +644,19 @@
644644
- [§16.4.8](structs.md#1648-field-initializers) Field initializers
645645
- [§16.4.9](structs.md#1649-constructors) Constructors
646646
- [§16.4.10](structs.md#16410-static-constructors) Static constructors
647-
- [§16.4.11](structs.md#16411-automatically-implemented-properties) Automatically implemented properties
648-
- [§16.4.12](structs.md#16412-safe-context-constraint) Safe context constraint
649-
- [§16.4.12.1](structs.md#164121-general) General
650-
- [§16.4.12.2](structs.md#164122-parameter-safe-context) Parameter safe context
651-
- [§16.4.12.3](structs.md#164123-local-variable-safe-context) Local variable safe context
652-
- [§16.4.12.4](structs.md#164124-field-safe-context) Field safe context
653-
- [§16.4.12.5](structs.md#164125-operators) Operators
654-
- [§16.4.12.6](structs.md#164126-method-and-property-invocation) Method and property invocation
655-
- [§16.4.12.7](structs.md#164127-stackalloc) stackalloc
656-
- [§16.4.12.8](structs.md#164128-constructor-invocations) Constructor invocations
647+
- [§16.4.11](structs.md#16411-properties) Properties
648+
- [§16.4.12](structs.md#16412-methods) Methods
649+
- [§16.4.13](structs.md#16413-indexers) Indexers
650+
- [§16.4.14](structs.md#16414-events) Events
651+
- [§16.4.15](structs.md#16415-safe-context-constraint) Safe context constraint
652+
- [§16.4.15.1](structs.md#164151-general) General
653+
- [§16.4.15.2](structs.md#164152-parameter-safe-context) Parameter safe context
654+
- [§16.4.15.3](structs.md#164153-local-variable-safe-context) Local variable safe context
655+
- [§16.4.15.4](structs.md#164154-field-safe-context) Field safe context
656+
- [§16.4.15.5](structs.md#164155-operators) Operators
657+
- [§16.4.15.6](structs.md#164156-method-and-property-invocation) Method and property invocation
658+
- [§16.4.15.7](structs.md#164157-stackalloc) stackalloc
659+
- [§16.4.15.8](structs.md#164158-constructor-invocations) Constructor invocations
657660
- [§17](arrays.md#17-arrays) Arrays
658661
- [§17.1](arrays.md#171-general) General
659662
- [§17.2](arrays.md#172-array-types) Array types

standard/classes.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2094,6 +2094,7 @@ ref_method_modifier
20942094
| 'override'
20952095
| 'abstract'
20962096
| 'extern'
2097+
| 'readonly' // direct struct members only
20972098
| unsafe_modifier // unsafe code support
20982099
;
20992100
@@ -2132,7 +2133,7 @@ Grammar notes:
21322133

21332134
> *Note*: The overlapping of, and priority between, alternatives here is solely for descriptive convenience; the grammar rules could be elaborated to remove the overlap. ANTLR, and other grammar systems, adopt the same convenience and so *method_body* has the specified semantics automatically. *end note*
21342135
2135-
A *method_declaration* may include a set of *attributes* ([§22](attributes.md#22-attributes)) and one of the permitted kinds of declared accessibility ([§15.3.6](classes.md#1536-access-modifiers)), the `new` ([§15.3.5](classes.md#1535-the-new-modifier)), `static` ([§15.6.3](classes.md#1563-static-and-instance-methods)), `virtual` ([§15.6.4](classes.md#1564-virtual-methods)), `override` ([§15.6.5](classes.md#1565-override-methods)), `sealed` ([§15.6.6](classes.md#1566-sealed-methods)), `abstract` ([§15.6.7](classes.md#1567-abstract-methods)), `extern` ([§15.6.8](classes.md#1568-external-methods)) and `async` ([§15.15](classes.md#1515-async-functions)) modifiers.
2136+
A *method_declaration* may include a set of *attributes* ([§22](attributes.md#22-attributes)) and one of the permitted kinds of declared accessibility ([§15.3.6](classes.md#1536-access-modifiers)), the `new` ([§15.3.5](classes.md#1535-the-new-modifier)), `static` ([§15.6.3](classes.md#1563-static-and-instance-methods)), `virtual` ([§15.6.4](classes.md#1564-virtual-methods)), `override` ([§15.6.5](classes.md#1565-override-methods)), `sealed` ([§15.6.6](classes.md#1566-sealed-methods)), `abstract` ([§15.6.7](classes.md#1567-abstract-methods)), `extern` ([§15.6.8](classes.md#1568-external-methods)) and `async` ([§15.15](classes.md#1515-async-functions)). Additionally a *method_declaration* that is contained directly by a *struct_declaration* may include the `readonly` modifier ([§16.4.12](structs.md#16412-methods)).
21362137

21372138
A declaration has a valid combination of modifiers if all of the following are true:
21382139

@@ -3281,6 +3282,7 @@ property_modifier
32813282
| 'override'
32823283
| 'abstract'
32833284
| 'extern'
3285+
| 'readonly' // direct struct members only
32843286
| unsafe_modifier // unsafe code support
32853287
;
32863288
@@ -3301,7 +3303,7 @@ ref_property_body
33013303
33023304
*unsafe_modifier* ([§23.2](unsafe-code.md#232-unsafe-contexts)) is only available in unsafe code ([§23](unsafe-code.md#23-unsafe-code)).
33033305

3304-
There are two kinds of *property_declaration*:
3306+
A *property_declaration* may include a set of *attributes* ([§22](attributes.md#22-attributes)) and any one of the permitted kinds of declared accessibility ([§15.3.6](classes.md#1536-access-modifiers)), the `new` ([§15.3.5](classes.md#1535-the-new-modifier)), `static` ([§15.7.2](classes.md#1572-static-and-instance-properties)), `virtual` ([§15.6.4](classes.md#1564-virtual-methods), [§15.7.6](classes.md#1576-virtual-sealed-override-and-abstract-accessors)), `override` ([§15.6.5](classes.md#1565-override-methods), [§15.7.6](classes.md#1576-virtual-sealed-override-and-abstract-accessors)), `sealed` ([§15.6.6](classes.md#1566-sealed-methods)), `abstract` ([§15.6.7](classes.md#1567-abstract-methods), [§15.7.6](classes.md#1576-virtual-sealed-override-and-abstract-accessors)) and `extern` ([§15.6.8](classes.md#1568-external-methods)). Additionally a *property_declaration* that is contained directly by a *struct_declaration* may include the `readonly` modifier ([§16.4.11](structs.md#16411-properties)).
33053307

33063308
- The first declares a non-ref-valued property. Its value has type *type*. This kind of property may be readable and/or writeable.
33073309
- The second declares a ref-valued property. Its value is a *variable_reference* ([§9.5](variables.md#95-variable-references)), that may be `readonly`, to a variable of type *type*. This kind of property is only readable.
@@ -3366,6 +3368,7 @@ accessor_modifier
33663368
| 'internal' 'protected'
33673369
| 'protected' 'private'
33683370
| 'private' 'protected'
3371+
| 'readonly' // direct struct members only
33693372
;
33703373
33713374
accessor_body
@@ -3392,6 +3395,7 @@ For a ref-valued property the *ref_get_accessor_declaration* consists optional a
33923395
The use of *accessor_modifier*s is governed by the following restrictions:
33933396

33943397
- An *accessor_modifier* shall not be used in an interface or in an explicit interface member implementation.
3398+
- The *accessor_modifier* `readonly` is permitted only in a *property_declaration* or *indexer_declaration* that is contained directly by a *struct_declaration* ([§16.4.11](structs.md#16411-properties), [§16.4.13](structs.md#16413-indexers)).
33953399
- For a property or indexer that has no `override` modifier, an *accessor_modifier* is permitted only if the property or indexer has both a get and set accessor, and then is permitted only on one of those accessors.
33963400
- For a property or indexer that includes an `override` modifier, an accessor shall match the *accessor_modifier*, if any, of the accessor being overridden.
33973401
- The *accessor_modifier* shall declare an accessibility that is strictly more restrictive than the declared accessibility of the property or indexer itself. To be precise:
@@ -4024,6 +4028,7 @@ event_modifier
40244028
| 'override'
40254029
| 'abstract'
40264030
| 'extern'
4031+
| 'readonly' // direct struct members only
40274032
| unsafe_modifier // unsafe code support
40284033
;
40294034
@@ -4043,7 +4048,7 @@ remove_accessor_declaration
40434048
40444049
*unsafe_modifier* ([§23.2](unsafe-code.md#232-unsafe-contexts)) is only available in unsafe code ([§23](unsafe-code.md#23-unsafe-code)).
40454050

4046-
An *event_declaration* may include a set of *attributes* ([§22](attributes.md#22-attributes)) and any one of the permitted kinds of declared accessibility ([§15.3.6](classes.md#1536-access-modifiers)), the `new` ([§15.3.5](classes.md#1535-the-new-modifier)), `static` ([§15.6.3](classes.md#1563-static-and-instance-methods), [§15.8.4](classes.md#1584-static-and-instance-events)), `virtual` ([§15.6.4](classes.md#1564-virtual-methods), [§15.8.5](classes.md#1585-virtual-sealed-override-and-abstract-accessors)), `override` ([§15.6.5](classes.md#1565-override-methods), [§15.8.5](classes.md#1585-virtual-sealed-override-and-abstract-accessors)), `sealed` ([§15.6.6](classes.md#1566-sealed-methods)), `abstract` ([§15.6.7](classes.md#1567-abstract-methods), [§15.8.5](classes.md#1585-virtual-sealed-override-and-abstract-accessors)), and `extern` ([§15.6.8](classes.md#1568-external-methods)) modifiers.
4051+
An *event_declaration* may include a set of *attributes* ([§22](attributes.md#22-attributes)) and any one of the permitted kinds of declared accessibility ([§15.3.6](classes.md#1536-access-modifiers)), the `new` ([§15.3.5](classes.md#1535-the-new-modifier)), `static` ([§15.6.3](classes.md#1563-static-and-instance-methods), [§15.8.4](classes.md#1584-static-and-instance-events)), `virtual` ([§15.6.4](classes.md#1564-virtual-methods), [§15.8.5](classes.md#1585-virtual-sealed-override-and-abstract-accessors)), `override` ([§15.6.5](classes.md#1565-override-methods), [§15.8.5](classes.md#1585-virtual-sealed-override-and-abstract-accessors)), `sealed` ([§15.6.6](classes.md#1566-sealed-methods)), `abstract` ([§15.6.7](classes.md#1567-abstract-methods), [§15.8.5](classes.md#1585-virtual-sealed-override-and-abstract-accessors)) and `extern` ([§15.6.8](classes.md#1568-external-methods)) modifiers. Additionally an *event_declaration* that is contained directly by a *struct_declaration* may include the `readonly` modifier ([§16.4.12](structs.md#16412-methods)).
40474052

40484053
Event declarations are subject to the same rules as method declarations ([§15.6](classes.md#156-methods)) with regard to valid combinations of modifiers.
40494054

@@ -4304,6 +4309,7 @@ indexer_modifier
43044309
| 'override'
43054310
| 'abstract'
43064311
| 'extern'
4312+
| 'readonly' // direct struct members only
43074313
| unsafe_modifier // unsafe code support
43084314
;
43094315
@@ -4325,7 +4331,7 @@ ref_indexer_body
43254331
43264332
*unsafe_modifier* ([§23.2](unsafe-code.md#232-unsafe-contexts)) is only available in unsafe code ([§23](unsafe-code.md#23-unsafe-code)).
43274333

4328-
There are two kinds of *indexer_declaration*:
4334+
An *indexer_declaration* may include a set of *attributes* ([§22](attributes.md#22-attributes)) and any one of the permitted kinds of declared accessibility ([§15.3.6](classes.md#1536-access-modifiers)), the `new` ([§15.3.5](classes.md#1535-the-new-modifier)), `virtual` ([§15.6.4](classes.md#1564-virtual-methods)), `override` ([§15.6.5](classes.md#1565-override-methods)), `sealed` ([§15.6.6](classes.md#1566-sealed-methods)), `abstract` ([§15.6.7](classes.md#1567-abstract-methods)) and `extern` ([§15.6.8](classes.md#1568-external-methods)) modifiers. Additionally an *indexer_declaration* that is contained directly by a *struct_declaration* may include the `readonly` modifier ([§16.4.12](structs.md#16412-methods)).
43294335

43304336
- The first declares a non-ref-valued indexer. Its value has type *type*. This kind of indexer may be readable and/or writeable.
43314337
- The second declares a ref-valued indexer. Its value is a *variable_reference* ([§9.5](variables.md#95-variable-references)), that may be `readonly`, to a variable of type *type*. This kind of indexer is only readable.

standard/conversions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ Specifically, an anonymous function `F` is compatible with a delegate type `D`
767767
768768
> *Example*: The following examples illustrate these rules:
769769
>
770-
> <!-- Example: {template:"code-in-class-lib-without-using", name:"AnonymousFunctionsConv1", expectedErrors:["CS1593","CS1661","CS1678","CS8030","CS1688","CS1661","CS1676","CS1643","CS0126","CS0029","CS1662","CS1670","CS0029","CS1662"]} -->
770+
> <!-- Example: {template:"code-in-class-lib-without-using", name:"AnonymousFunctionsConv1", expectedErrors:["CS1593","CS1661","CS1678","CS8030","CS1688","CS1676","CS1643","CS0126","CS0029","CS1662","CS1670","CS0029","CS1662"]} -->
771771
> ```csharp
772772
> delegate void D(int x);
773773
> D d1 = delegate { }; // Ok

0 commit comments

Comments
 (0)