GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix MatchInfoContext Clone implementation by dee-see · Pull Request #5121 · PowerShell/PowerShell

Conversation

@dee-see

@dee-see Dominic (dee-see) commented Oct 14, 2017

Copy link
Copy Markdown
Contributor

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dee-see
Fix MatchInfoContext clone implementation
038786d
The old implementation always set the new object's properties to null
@dee-see
Dominic (dee-see) requested review from James Truher (JamesWTruher), Paul Higinbotham (PaulHigin) and Dan Travison (dantraMSFT) as code owners October 14, 2017 21:31
@daxian-dbw Dongbo Wang (daxian-dbw) self-assigned this Oct 15, 2017
lzybkr
Jason Shirk (lzybkr) approved these changes Oct 17, 2017
View reviewed changes

@lzybkr Jason Shirk (lzybkr) left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit 81c46c6 into PowerShell:master Oct 18, 2017
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@dee-see @daxian-dbw
Fix MatchInfoContext clone implementation (PowerShell#5121)
c5388c5
The old implementation always set the new object's properties to null.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dantraMSFT Dan Travison (dantraMSFT) Awaiting requested review from dantraMSFT
@JamesWTruher James Truher (JamesWTruher) Awaiting requested review from JamesWTruher
@PaulHigin Paul Higinbotham (PaulHigin) Awaiting requested review from PaulHigin
1 more reviewer
@lzybkr Jason Shirk (lzybkr) lzybkr approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@daxian-dbw Dongbo Wang (daxian-dbw)

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@dee-see @lzybkr @daxian-dbw
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.