- Notifications
You must be signed in to change notification settings - Fork92
Add support for target typed conditional expression#1071
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Draft
RexJaeschke wants to merge262 commits intodotnet:draft-v9Choose a base branch fromRexJaeschke:Add-support-for-target-typed-conditional-expression
base:draft-v9
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Draft
Add support for target typed conditional expression#1071
RexJaeschke wants to merge262 commits intodotnet:draft-v9fromRexJaeschke:Add-support-for-target-typed-conditional-expression
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Co-authored-by: BillWagner <BillWagner@users.noreply.github.com>
* Update clauses to separate unsafe codeFor the grammar, we separate the unsafe code extensions. Make that distinction in the clauses.json, the code that reads it, and the section renumbering tool.* Replicate current functionalityThe section renumbering tool now replicates the output from the grammar extraction tool.Refactoring to come.* remove update grammar toolIt's no longer needed because it's functionality has been replicated in the section renumber tool.* Refactoring, part 1Simplify the loop that reads all the grammar productions from parts of the standard, and writes them to the grammar annex.* refactoring, part 2Read the existing text outside of the ANTLR productions from the existing annex.That way, we can make any edits to this text (including any changing section numbers) in the markdown file, rather than in the program source code.* some final refactoring* respond to feedback* one final small lint fix
Fix for issuedotnet#787The PR uses “corresponding parameter” rather than the “ith parameter" fromdotnet#787. I think this is better, avoids HTML tags, and matches the use of corresponding parameter elsewhere; but either choice is valid.
* Update lexical-structure.md* fix editorial nits* fix editorial nits* fix editorial nits* fix editorial nits* fix editorial nits* fix editorial nits* fix editorial nits* fix editorial nits* fix editorial nits* Update standard/expressions.mdCo-authored-by: Bill Wagner <wiwagn@microsoft.com>* Apply suggestions from code reviewCo-authored-by: Nigel-Ecma <perryresearch@zoot.net.nz>* Update standard/expressions.mdCo-authored-by: Nigel-Ecma <perryresearch@zoot.net.nz>* Update standard/expressions.md---------Co-authored-by: Bill Wagner <wiwagn@microsoft.com>Co-authored-by: Nigel-Ecma <perryresearch@zoot.net.nz>Co-authored-by: Jon Skeet <skeet@pobox.com>
* reverse some V7 edits* Update standard/classes.md---------Co-authored-by: Jon Skeet <skeet@pobox.com>
Fixesdotnet#987Missing table part was just a production mishap.Fixes the typo IFormatable -> IFormattable
* Upgrade .NET and NuGet packagesThere were some breaking changes in the Word Converter packages. The only source code changes were to address the Word converter source breaks.* interim checkin. Revert to 4.1.0* Remove unnecessary usings, filespace usingReview this diff by hiding whitespace.First, remove all unnecessary usings.Second, convert all namespace declarations to file scoped namespaces.* add editorconfigThis one is consistent with the version on dotnet/docs. We can season to taste as we're ready.* Use the .NET 8 SDK for all our tools.* Revert the grammar validator to .net 6I've got a PR in that repo to update it. Once approved, I'll install the NuGet package here, and update that YML file.* respond to review comments- Update Roslyn packages to 4.8- Remove coverlet- Formatting in csproj.
Generic attributes will be valid in the future (and Roslyn knowsthat), so the error code has changed.
Many of these are fixed with just pattern matching. I've beenliberal with the null-forgiving operator in the Word document codeitself, but most of the rest is fairly straightforward to handlesafely.Fixesdotnet#998.
Fixesdotnet#938Add an example of a type pattern to demonstrate when a pattern generates a compile-time error.
Fixesdotnet#937I admit this rule confused me, and I asked to add the example.After reading the updated, I'm ambivalent about adding the example. I don't want to move it into the bullet list, as that breaks the flow even more.Let's discuss if it's needed at the meeting.
This already existed in the right place (in the list of argumentevaluation steps) but the example was associated with the duplicate.Fixesdotnet#801.
Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
A note was duplicated (historically it was an in para note in v5, a standalone note in v6, and now in v7 is both – I'd blame git ;-))
Fixesdotnet#845.I'm not at all convinced of the tone or precision of this - it'seffectively a straw man for further discussion.
…aturesFixesdotnet#782.(I hadn't noticed that the same thing is relevant for indexers.)
* wordsmiting on return-by-refFixesdotnet#805Clarify that return-by-ref expressions are evaluated the same as return-by-value expressions. The distinction is that for return-by-ref, the result must be a variable reference.* bonus typo fix* Update standard/statements.mdCo-authored-by: Jon Skeet <skeet@pobox.com>---------Co-authored-by: Jon Skeet <skeet@pobox.com>
* Link sections on `throw` and handling exceptionsFixesdotnet#776Links are added in both directions between §21.4 and §13.10.6.* Update standard/exceptions.mdCo-authored-by: Bill Wagner <wiwagn@microsoft.com>---------Co-authored-by: Mads Torgersen <mads.torgersen@microsoft.com>
This clarifies that even NRE, DivideByZeroException etc counts asthe exception being thrown.
Fixesdotnet#771Add instances where the `<` and `>` characters are replaced by `{` and `}` in the string IDs.
Fixesdotnet#772Single dimension arrays are encoded as "[]" rather than "[0]".
Fixesdotnet#915In the example in D5, add the "name=" attribute on all param tags.
…5 -> v6 transition, and cleanup references
Co-authored-by: jskeet <17011+jskeet@users.noreply.github.com>
This minimizes a potential security attack vector.
Bumps the dotnet group in /tools with 2 updates: [Microsoft.Build.Locator](https://github.com/microsoft/MSBuildLocator) and XMLUnit.Core.Updates `Microsoft.Build.Locator` from 1.7.8 to 1.9.1- [Release notes](https://github.com/microsoft/MSBuildLocator/releases)- [Commits](microsoft/MSBuildLocator@v1.7.8...v1.9.1)Updates `XMLUnit.Core` from 2.10.0 to 2.11.0---updated-dependencies:- dependency-name: Microsoft.Build.Locator dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dotnet- dependency-name: XMLUnit.Core dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dotnet...Signed-off-by: dependabot[bot] <support@github.com>Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.11.0 to 2.11.1.- [Release notes](https://github.com/step-security/harden-runner/releases)- [Commits](step-security/harden-runner@4d991eb...c6295a6)---updated-dependencies:- dependency-name: step-security/harden-runner dependency-type: direct:production update-type: version-update:semver-patch...Signed-off-by: dependabot[bot] <support@github.com>Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: BillWagner <BillWagner@users.noreply.github.com>
Co-authored-by: Nigel-Ecma <6654683+Nigel-Ecma@users.noreply.github.com>
Fix a small typo noticed in the meeting
Co-authored-by: jskeet <jskeet@users.noreply.github.com>
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.3.0 to 4.4.0.- [Release notes](https://github.com/actions/setup-node/releases)- [Commits](actions/setup-node@cdca736...49933ea)---updated-dependencies:- dependency-name: actions/setup-node dependency-version: 4.4.0 dependency-type: direct:production update-type: version-update:semver-minor...Signed-off-by: dependabot[bot] <support@github.com>Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…up (dotnet#1306)Bumps the dotnet group in /tools with 1 update: [System.Text.Json](https://github.com/dotnet/runtime).Updates `System.Text.Json` from 9.0.3 to 9.0.4- [Release notes](https://github.com/dotnet/runtime/releases)- [Commits](dotnet/runtime@v9.0.3...v9.0.4)---updated-dependencies:- dependency-name: System.Text.Json dependency-version: 9.0.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet...Signed-off-by: dependabot[bot] <support@github.com>Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.11.1 to 2.12.0.- [Release notes](https://github.com/step-security/harden-runner/releases)- [Commits](step-security/harden-runner@c6295a6...0634a26)---updated-dependencies:- dependency-name: step-security/harden-runner dependency-version: 2.12.0 dependency-type: direct:production update-type: version-update:semver-minor...Signed-off-by: dependabot[bot] <support@github.com>Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Inline type_arguments into type_argument_list- Tidy global_attribute_section, attribute_section & attribute_list- Merge in updated samples & tarball - Includes updated declaration_expression predicateCo-authored-by: Nigel-Ecma <Nigel-Ecma@users.noreply.github.com>
Co-authored-by: BillWagner <BillWagner@users.noreply.github.com>
Co-authored-by: Jon Skeet <skeet@pobox.com>
Co-authored-by: jskeet <jskeet@users.noreply.github.com>
…1324)Bumps the dotnet group in /tools with 1 update: [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit).Updates `xunit.runner.visualstudio` from 3.0.2 to 3.1.0- [Release notes](https://github.com/xunit/visualstudio.xunit/releases)- [Commits](xunit/visualstudio.xunit@3.0.2...3.1.0)---updated-dependencies:- dependency-name: xunit.runner.visualstudio dependency-version: 3.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dotnet...Signed-off-by: dependabot[bot] <support@github.com>Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
12.18 Conditional operator has an open issue; see the following words in that section:placeholder for words somehow referring to “12.6.4.5 Better conversion from expression.”
Here are the details:
Mail to Bill on 2024-03-18: The MS spec suggests the text for “12.6.4.5 Better conversion from expression” be augmented; OK. However, “12.18 Conditional operator“ doesnot reference that section; instead, it points to “12.6.3.15 Finding the best common type of a set of expressions.” So, I don’t see how the proposed changes to “better conversion” will be seen in the context of “best common type.” Unless these two are somehow linked and I’m not seeing where.
Bill’s reply on 2024-04-01: I think the conditional expression section should reference both sections, as sometimes the conditional expression applies when there is no best common type.