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 .NET adapter to not throw when fails to create a PSMethod due to ByRef-like type by daxian-dbw · Pull Request #7788 · PowerShell/PowerShell

Conversation

@daxian-dbw

@daxian-dbw Dongbo Wang (daxian-dbw) commented Sep 14, 2018 •
edited by adityapatwardhan
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

PR Summary

Fix #7786

When embedding signatures of the overload methods into a PSMethod, we don't handle ByRef-like types -- overload methods with ByRef-like type parameters will be marked as 'NonBindable' and get ignored in the conversion from PSMethod to Delegate. This PR fix a bug that causes exception to be thrown when dealing with a ByRef-like type being used by a ref or out parameter.

/cc Patrick Meinecke (@SeeminglyScience)

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Change is not breaking
  • Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
  • This PR is ready to merge and is not Work in Progress.
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready.
  • User-facing changes
    • Not Applicable
    • OR
    • User-facing Documentation needed
      • Issue filed - Issue link:
  • Testing - New and feature
    • Not Applicable or can only be tested interactively
    • OR
    • Make sure you've added a new test if existing tests do not effectively test the code changed
      • Add [feature] if the change is significant or affects feature tests

Sorry, something went wrong.

Uh oh!

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

SeeminglyScience reacted with hooray emoji
All reactions
  • 🎉 1 reaction
@daxian-dbw
Fix .NET adapter to not throw when fails to create a PSMethod due to …
35cf275
…ByRef-like type
@daxian-dbw
Dongbo Wang (daxian-dbw) requested review from Bruce Payette (BrucePay) and Aditya Patwardhan (adityapatwardhan) September 14, 2018 18:35
iSazonov
Ilya (iSazonov) approved these changes Sep 17, 2018
View reviewed changes
@daxian-dbw Dongbo Wang (daxian-dbw) self-assigned this Sep 17, 2018
@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit 285e471 into PowerShell:master Sep 17, 2018
@daxian-dbw
Dongbo Wang (daxian-dbw) deleted the bugfix branch September 17, 2018 19:46
@iSazonov Ilya (iSazonov) mentioned this pull request Jan 28, 2019
Formatter throws when object has a pointer property #8765
Closed
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@daxian-dbw
Fix .NET adapter to not throw when fails to create a PSMethod due to …
915ec7e
…ByRef-like type (PowerShell#7788)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iSazonov Ilya (iSazonov) iSazonov approved these changes
@BrucePay Bruce Payette (BrucePay) Awaiting requested review from BrucePay
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Awaiting requested review from adityapatwardhan

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.

DotNetAdapter fails to create PSMethod with a ByRef parameter of a ref struct

Uh oh!

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

2 participants

@daxian-dbw @iSazonov
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.