Title: Impossible to call overridden `protected internal` method of base class. · Issue #7622 · PowerShell/PowerShell · GitHub
Open Graph Title: Impossible to call overridden `protected internal` method of base class. · Issue #7622 · PowerShell/PowerShell
X Title: Impossible to call overridden `protected internal` method of base class. · Issue #7622 · PowerShell/PowerShell
Description: Steps to reproduce Derive from a class with virtual protected internal method. For example, System.Diagnostics.Tracing.EventListener, System.Net.Http.DelegatingHandler. Override that method. Call that method of base class. Add-Type -Type...
Open Graph Description: Steps to reproduce Derive from a class with virtual protected internal method. For example, System.Diagnostics.Tracing.EventListener, System.Net.Http.DelegatingHandler. Override that method. Call t...
X Description: Steps to reproduce Derive from a class with virtual protected internal method. For example, System.Diagnostics.Tracing.EventListener, System.Net.Http.DelegatingHandler. Override that method. Call t...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/7622
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Impossible to call overridden `protected internal` method of base class.","articleBody":"Steps to reproduce\r\n------------------\r\nDerive from a class with virtual `protected internal` method. For example, `System.Diagnostics.Tracing.EventListener`, `System.Net.Http.DelegatingHandler`.\r\nOverride that method.\r\nCall that method of base class.\r\n```powershell\r\nAdd-Type -TypeDefinition @'\r\n public class BaseMembersTestClass\r\n {\r\n protected internal virtual int TestMethod()\r\n {\r\n return 1001;\r\n }\r\n }\r\n'@\r\n$derived = Invoke-Expression @'\r\n class BaseCallTestClass : BaseMembersTestClass\r\n {\r\n [int] TestMethod()\r\n {\r\n return 3 * ([BaseMembersTestClass]$this).TestMethod()\r\n }\r\n }\r\n\r\n [BaseCallTestClass]::new()\r\n'@\r\n\r\n$derived.TestMethod()\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\nMethod of base class should be called.\r\n\r\nActual behavior\r\n---------------\r\nOverridden implementation called recursively until\r\n```none\r\nProcess is terminating due to StackOverflowException.\r\n```\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```powershell\r\n> $PSVersionTable\r\n\r\nName Value\r\n---- -----\r\nPSVersion 6.0.3\r\nPSEdition Core\r\nGitCommitId v6.0.3\r\nOS Microsoft Windows 10.0.17134\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n","author":{"url":"https://github.com/yurko7","@type":"Person","name":"yurko7"},"datePublished":"2018-08-23T19:52:51Z","url":"https://github.com/PowerShell/PowerShell/issues/7622"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:87b593cd-6f43-5c08-9e39-073991b65787 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C0CE:26FF81:6281AE:8B4EBE:6AFDC0A7 |
| html-safe-nonce | e0cc1c8658a5ec212a27ece40e3625bc9f54a2da1c48c0d46631cd89cf143ce8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMENFOjI2RkY4MTo2MjgxQUU6OEI0RUJFOjZBRkRDMEE3IiwidmlzaXRvcl9pZCI6Ijc5MzU5MzY5OTg3NjAzNjYyNDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | dfbb7da2846cd7a706144069d7d649d459ba8d49b08d21c39363ce18ebed1bae |
| hovercard-subject-tag | issue:353529116 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/7622/issue_layout |
| twitter:image | https://opengraph.githubassets.com/95347d06dd565cf8ebede4aad797a1bb68f700c2686c80f64ffe70ff667d8ef3/PowerShell/PowerShell/issues/7622 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/95347d06dd565cf8ebede4aad797a1bb68f700c2686c80f64ffe70ff667d8ef3/PowerShell/PowerShell/issues/7622 |
| og:image:alt | Steps to reproduce Derive from a class with virtual protected internal method. For example, System.Diagnostics.Tracing.EventListener, System.Net.Http.DelegatingHandler. Override that method. Call t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yurko7 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 35c6bf57da1370dc64866160540c0ee9f825f291935b3bf6ec5492b00e35f3a6 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ab48c73a2978548773f5f24717ed9e58508befdb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width