-
Notifications
You must be signed in to change notification settings - Fork 90
Merge v7 work #728
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
Merge v7 work #728
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
Add C# 7 paragraph, convert C# 6 to "standard" from "draft"
* Fix typo * Fix one more typo
Co-authored-by: Neal Gafter <[email protected]> Co-authored-by: Jon Skeet <[email protected]>
Very rough and ready, and will need to be expanded (e.g. for expected exceptions) but it's enough to at least start a discussion. Not yet tested on non-Windows platforms.
Co-authored-by: Bill Wagner <[email protected]> Co-authored-by: Neal Gafter <[email protected]>
* Update statements.md * Update unsafe-code.md * Add semantics and example for local functions v7.0 feature * removed local function unsafe grammar extension With the consolidation of the unsafe grammar in PR dotnet#233, this text is no longer needed. * include support for local functions * add support for local functions * fix build issues * Apply suggestions from code review Co-authored-by: KalleOlaviNiemitalo <[email protected]> * clarify definite assignment, add examples Addresses comments in committee meeting: - dotnet#104 (comment) - dotnet#104 (comment) * respond to feedback. * grammar updates * Incorporate Andy's text In this commit, create the new clause for the definite assignment rules for local functions. Move the existing example to that clause. Add text from Andy's comments and notes. * finish local functions and definite assignment. Incorporate the rules for definite assignment for captured variables in local functions. This is both for local function calls and for delegate conversion. * typo * Apply suggestions from code review Co-authored-by: Nigel-Ecma <[email protected]> * Apply suggestions from code review * Update standard/statements.md Co-authored-by: Jon Skeet <[email protected]> * Update standard/statements.md * Update standard/statements.md Co-authored-by: Neal Gafter <[email protected]> * Update standard/statements.md * Update standard/statements.md * edits based on September committee meeting * fix link text * fix section renumbering issue * Final edits We resolved these two discussions during the committee meeting. Edits reflect those decisions. * updates from code review. * one more bit of feedback. Co-authored-by: Bill Wagner <[email protected]> Co-authored-by: KalleOlaviNiemitalo <[email protected]> Co-authored-by: Nigel-Ecma <[email protected]> Co-authored-by: Jon Skeet <[email protected]> Co-authored-by: Neal Gafter <[email protected]>
We weren't running these validations when we merged changes into the draft-v7 branch.
Co-authored-by: BillWagner <[email protected]>
* Update expressions.md * build fixes * Minor changes to bring this in line with the spec style and organization. * Expression bodied member can be a throw expression. * Add throw expression as a category into which an expression may be classified. * Fix section number. * fix merge error. * add column end marker * still rendering * add one more escape it appears that once any vertical bar is escaped in a table, they all must be. * Add throw expressions to precedence table * Move throw expression to a new top-level section after null coalescing operator * Fix typo * Update reference * Update link to new section Co-authored-by: Bill Wagner <[email protected]> Co-authored-by: Bill Wagner <[email protected]> Co-authored-by: Neal Gafter <[email protected]> Co-authored-by: Jon Skeet <[email protected]>
Co-authored-by: BillWagner <[email protected]>
Label `LABEL:` is not followed by a statement, and needs to be; null statement added Enhanced 2xdelegate examples, so they are a better fit for the test harness
This allows the code to compile (as a single compilation unit, even though it's supposed to be in two separate compilation units).
The Color Color problem code needed a tiny change to avoid the ellipsis needing to return anything, but then it works.
This will allow for examples which are just statements. (Also adds example in 16.1 Arrays to show how to use it.) Towards dotnet#646
…dotnet#648) Only the name (without the namespace) is specified; the FQN could be quite long-winded in the metadata. Towards dotnet#646.
* Correct/reformat example * Correct/reformat example * minor tweak * fix errors in previous commit * make minor tweaks * add Point and Rectangle support files I removed the redundant, hard-coded 1x`Point` and 2x`Rectangle` type declarations, replacing them with the following additions to the "additional-files" folder: Point.cs, Rectangle.cs, and RectangleWithConstructorPointAllocation.cs, and using the appropriate `additionalFiles:` in the examples' metadata. * Create Point.cs * Create Rectangle.cs * Create RectangleWithConstructorPointAllocation.cs * Apply fixes requested by Jon * Fix nits found by Jon
* revise example metadata * fix html comment formatting
* revise example metadata * correct xml output
* revise example metadata * Update classes.md * fix md formatting
* Revise user guide * mention limits on looking for console block
This allows the output to be ignored for nondeterministic or implementation-defined behavior.
* activate example extraction * activate example extraction
* have example generate output * minor tweak to example * use new template code-in-partial-class * Create Library.cs * Create Project.csproj * Create Caller.cs
In example PointerTypes1, the act of dereferencing `px1` and `px2` in `Main` is undefined. As such, the program might even abort! And even if the program executes, there is no point attempting to write out the underling `int` values, as they can be bogus, and certainly not predictable. (In my testing, *each* time I ran this program with output, one of the two values changed.) So, I removed expectedOutput, changed the template, added some comments, and replaced the writes with dereferences to two new local variables. For example PointerConversions1, I made no changes; I just activated this example. For both examples, I added an HTML comment: `> <!-- Note: the behavior of this example is undefined. -->`.
* Make all example tests pass (Currently 455 of them.) * Reformat all examples
jskeet
approved these changes
Jan 31, 2023
Sign up for free
to 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.
Merge in updates for V7. This is a single merge commit that brings all the V7 updates into the draft-v8 working branch.
DON'T SQUASH MERGE THIS PR.