Skip to content

Restored requirement for struct constructors to always have formal param...#1052

Closed
VSadov wants to merge 1 commit intodotnet:masterfrom
VSadov:parameterless
Closed

Restored requirement for struct constructors to always have formal param...#1052
VSadov wants to merge 1 commit intodotnet:masterfrom
VSadov:parameterless

Conversation

@VSadov
Copy link
Member

@VSadov VSadov commented Mar 5, 2015

...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.

…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.
@VSadov
Copy link
Member Author

VSadov commented Mar 6, 2015

@gafter @AlekseyTs
This is a fairly simple change. Could you take a look?
(VB counterpart will follow shortly as a separate change)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably remove this and mark the number for reuse.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove corresponding string from resources?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

@gafter
Copy link
Member

gafter commented Mar 6, 2015

Looks good to me, modulo two small changes suggested by @AlekseyTs

@AlekseyTs
Copy link
Contributor

LGTM under the same conditions.

@VSadov
Copy link
Member Author

VSadov commented Mar 7, 2015

This was submitted together with corresponding VB changes.

@VSadov VSadov closed this Mar 7, 2015
@VSadov VSadov deleted the parameterless branch August 4, 2015 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants