Restored requirement for struct constructors to always have formal param...#1052
Closed
VSadov wants to merge 1 commit intodotnet:masterfrom
Closed
Restored requirement for struct constructors to always have formal param...#1052VSadov wants to merge 1 commit intodotnet:masterfrom
VSadov wants to merge 1 commit intodotnet:masterfrom
Conversation
…rameters (C#) Issue dotnet#1029 While overall parameterless constructors in structs are valid from IL perspective, without a convenient way to declare them they were virtually nonexistent. As we performed more and more testing, we kept discovering cases where parameterless struct constructors caused inconsistent behavior in libraries or even in some versions of CLR. After reconsidering the potential issues arising from breaking long standing assumptions, we decided it was best for our users to restore the requirement on struct constructors to always have formal parameters.
Member
Author
|
@gafter @AlekseyTs |
Contributor
There was a problem hiding this comment.
We should probably remove this and mark the number for reuse.
Contributor
There was a problem hiding this comment.
Remove corresponding string from resources?
Member
|
Looks good to me, modulo two small changes suggested by @AlekseyTs |
Contributor
|
LGTM under the same conditions. |
Member
Author
|
This was submitted together with corresponding VB changes. |
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
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.
...eters (C#)
Issue #1029
While overall parameterless constructors in structs are valid from IL perspective, without a convenient way to declare them they were virtually nonexistent. As we performed more and more testing, we kept discovering cases where parameterless struct constructors caused inconsistent behavior in libraries or even in some versions of CLR.
After reconsidering the potential issues arising from breaking long standing assumptions, we decided it was best for our users to restore the requirement on struct constructors to always have formal parameters.