Skip to content

Conversation

@dee-see
Copy link
Contributor

@dee-see dee-see commented Oct 14, 2017

Fix #3994

The old implementation always set the new object's properties to null.

The original issue mentioned that the other Clone implementation in MatchString.cs had the same bug, but in fact it's correct because of the use of MemberwiseClone.

I didn't much unit testing of C# code going on in the project (or maybe I missed it?). Should I add a test and if so, where?

The old implementation always set the new object's properties to null
Copy link
Contributor

@lzybkr lzybkr left a comment

Choose a reason for hiding this comment

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

Code change is fine.

A test would be nice, ideally failing if a new property is introduced but not cloned. That might be hard, so just checking the number of properties and a good comment might be sufficient.

@daxian-dbw daxian-dbw merged commit 81c46c6 into PowerShell:master Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants