René's URL Explorer Experiment


Title: Subclassing ValueType with custom constructor crashes with internal CLR error · Issue #10231 · PowerShell/PowerShell · GitHub

Open Graph Title: Subclassing ValueType with custom constructor crashes with internal CLR error · Issue #10231 · PowerShell/PowerShell

X Title: Subclassing ValueType with custom constructor crashes with internal CLR error · Issue #10231 · PowerShell/PowerShell

Description: PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.

Open Graph Description: PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.

X Description: PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.

Opengraph URL: https://github.com/PowerShell/PowerShell

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Subclassing ValueType with custom constructor crashes with internal CLR error","articleBody":"\u003c!--\r\n\r\nFor Windows PowerShell 5.1 issues, suggestions, or feature requests please use the following link instead:\r\nWindows PowerShell [UserVoice](https://windowsserver.uservoice.com/forums/301869-powershell)\r\n\r\nThis repository is **ONLY** for PowerShell Core 6 issues.\r\n\r\n- Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- Search the existing issues.\r\n- Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- Refer to the [known issues](https://docs.microsoft.com/powershell/scripting/whats-new/known-issues-ps6?view=powershell-6).\r\n\r\n-->\r\n\r\n# Steps to reproduce\r\n\r\n```powershell\r\n# Parameterless constructor isn't the best example since you can't\r\n# do that in C# either, but it also repros with parameters.\r\nclass Test : ValueType {\r\n    Test() { }\r\n}\r\n\r\n[Test]::new()\r\n```\r\n\r\n# Expected behavior\r\n\r\nEither\r\n\r\n1. Parse error when `ValueType` is the base class\r\n1. Special handling for value types when generating constructors. I'm guessing this has to do with `$this` needing to be explicitly boxed, but I haven't looked into it\r\n\r\n# Actual behavior\r\n\r\n```none\r\nInternal CLR error. (0x80131506)\r\n   at DynamicClass.Test(System.Runtime.CompilerServices.Closure, System.Management.Automation.Language.FunctionContext)\r\n   at System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(System.Management.Automation.ScriptBlockClauseToInvoke, Boolean, System.Collections.Generic.Dictionary`2\u003cSystem.String,System.Management.Automation.ScriptBlock>, System.Collections.Generic.List`1\u003cSystem.Management.Automation.PSVariable>, ErrorHandlingBehavior, System.Object, System.Object, System.Object, System.Management.Automation.Internal.Pipe, System.Management.Automation.InvocationInfo, System.Object[])\r\n   at System.Management.Automation.ScriptBlock.InvokeWithPipe(Boolean, ErrorHandlingBehavior, System.Object, System.Object, System.Object, System.Management.Automation.Internal.Pipe, System.Management.Automation.InvocationInfo, Boolean, System.Collections.Generic.List`1\u003cSystem.Management.Automation.PSVariable>, System.Collections.Generic.Dictionary`2\u003cSystem.String,System.Management.Automation.ScriptBlock>, System.Object[])\r\n   at System.Management.Automation.ScriptBlock.InvokeAsMemberFunction(System.Object, System.Object[])\r\n   at System.Management.Automation.Internal.ScriptBlockMemberMethodWrapper.InvokeHelper(System.Object, System.Object, System.Object[])\r\n   at System.RuntimeTypeHandle.CreateInstance(System.RuntimeType, Boolean, Boolean, Boolean ByRef, System.RuntimeMethodHandleInternal ByRef, Boolean ByRef)\r\n   at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean, Boolean, Boolean)\r\n   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean, Boolean, Boolean, Boolean)\r\n   at System.Activator.CreateInstance(System.Type, Boolean, Boolean)\r\n   at System.Activator.CreateInstance(System.Type)\r\n   at System.Management.Automation.Interpreter.InitializeLocalInstruction+MutableValue.Run(System.Management.Automation.Interpreter.InterpretedFrame)\r\n   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(System.Management.Automation.Interpreter.InterpretedFrame)\r\n   at System.Management.Automation.Interpreter.Interpreter.Run(System.Management.Automation.Interpreter.InterpretedFrame)\r\n   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon)\r\n```\r\n\r\nThe above stack trace minus the first two lines repeats for about 5,000 lines before PowerShell crashes.  Sometimes the stack trace isn't included, and it's just the first line.\r\n\r\n# Environment data\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```none\r\nName                           Value\r\n----                           -----\r\nPSVersion                      7.0.0-preview.2\r\nPSEdition                      Core\r\nGitCommitId                    7.0.0-preview.2\r\nOS                             Microsoft Windows 10.0.18362\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/SeeminglyScience","@type":"Person","name":"SeeminglyScience"},"datePublished":"2019-07-26T12:08:04Z","url":"https://github.com/PowerShell/PowerShell/issues/10231"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:f4c221c5-75e0-1e86-6eb7-bb2f235df181
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id84BE:3524E1:1B4F51:275D4E:6AFDD080
html-safe-nonceef881a2694262fcade29e50a58109506b1cee70d3fd4af6ef32008a49cb2f154
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NEJFOjM1MjRFMToxQjRGNTE6Mjc1RDRFOjZBRkREMDgwIiwidmlzaXRvcl9pZCI6IjMxODYyNjc4MTU4NDk4NzM1MzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc9e59d5f4eb819ae5f50da2fb29f857da3454af87b2d26910d980703b2b2afd5
hovercard-subject-tagrepository:49609581
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/PowerShell/PowerShell/issues/10231
twitter:imagehttps://repository-images.githubusercontent.com/49609581/aad0ad80-cdec-11ea-8248-a37bc0571bfd
twitter:cardsummary_large_image
og:imagehttps://repository-images.githubusercontent.com/49609581/aad0ad80-cdec-11ea-8248-a37bc0571bfd
og:image:altPowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None26886a40b582b821a7a76351e0a2f42b6d6160854b6e2520db24f31fd7be5da7
turbo-cache-controlno-cache
go-importgithub.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id49609581
octolytics-dimension-repository_nwoPowerShell/PowerShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49609581
octolytics-dimension-repository_network_root_nwoPowerShell/PowerShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release68ebaa631a1d248d69ebde4b9c5defd3a19aeb2f
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/PowerShell/PowerShell/issues/10231#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F10231
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F10231
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fissues%2Fshow&source=header-repo&source_repo=PowerShell%2FPowerShell
Reloadhttps://github.com/PowerShell/PowerShell/issues/10231
Reloadhttps://github.com/PowerShell/PowerShell/issues/10231
Reloadhttps://github.com/PowerShell/PowerShell/issues/10231
https://github.com/PowerShell/PowerShell
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/10231
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/10231
Subclassing ValueType with custom constructor crashes with internal CLR errorhttps://github.com/PowerShell/PowerShell/issues/10231#top
https://github.com/IISResetMe
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get ahttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Question%22
Resolution-No ActivityIssue has had no activity for 6 months or morehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-No%20Activity%22
Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorshttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Up-for-Grabs%22
WG-Enginecore PowerShell engine, interpreter, and runtimehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine%22
WG-ReviewedA Working Group has reviewed this and made a recommendationhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Reviewed%22
https://github.com/SeeminglyScience
Patrick Meinecke (SeeminglyScience)https://github.com/SeeminglyScience
on Jul 26, 2019https://github.com/PowerShell/PowerShell/issues/10231#issue-473326749
Patrick Meinecke (SeeminglyScience)https://github.com/SeeminglyScience
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get ahttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Question%22
on Jul 26, 2019https://github.com/PowerShell/PowerShell/issues/10231#event-2512384703
Ilya (iSazonov)https://github.com/iSazonov
WG-Enginecore PowerShell engine, interpreter, and runtimehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine%22
on Jul 29, 2019https://github.com/PowerShell/PowerShell/issues/10231#event-2515595936
https://github.com/iSazonov
Ilya (iSazonov)https://github.com/iSazonov
on Jan 31, 2020https://github.com/PowerShell/PowerShell/issues/10231#issuecomment-580617725
Rob Holt (@rjmholt)https://github.com/rjmholt
Rain Sallow (/u/ta11ow) (vexx32)https://github.com/vexx32
Needs-TriageThe issue is new and needs to be triaged by a work group.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Needs-Triage%22
on Jun 2, 2022https://github.com/PowerShell/PowerShell/issues/10231#event-6732200253
https://github.com/vexx32
Rain Sallow (/u/ta11ow) (vexx32)https://github.com/vexx32
on Jun 2, 2022https://github.com/PowerShell/PowerShell/issues/10231#issuecomment-1145422028
Rain Sallow (/u/ta11ow) (vexx32)https://github.com/vexx32
Mathias R. Jessen (IISResetMe)https://github.com/IISResetMe
on Jul 21, 2022https://github.com/PowerShell/PowerShell/issues/10231#event-7041423042
https://github.com/IISResetMe
Mathias R. Jessen (IISResetMe)https://github.com/IISResetMe
on Jul 21, 2022https://github.com/PowerShell/PowerShell/issues/10231#issuecomment-1191946982
Mathias R. Jessen (IISResetMe)https://github.com/IISResetMe
Needs-TriageThe issue is new and needs to be triaged by a work group.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Needs-Triage%22
on Jul 21, 2022https://github.com/PowerShell/PowerShell/issues/10231#event-7041545519
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
Resolution-No ActivityIssue has had no activity for 6 months or morehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-No%20Activity%22
on Nov 16, 2023https://github.com/PowerShell/PowerShell/issues/10231#event-10975827924
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
completedhttps://github.com/PowerShell/PowerShell/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 23, 2023https://github.com/PowerShell/PowerShell/issues/10231#event-11047262832
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Dec 29, 2024https://github.com/PowerShell/PowerShell/issues/10231#issuecomment-2564579373
Mathias R. Jessen (IISResetMe)https://github.com/IISResetMe
WG-ReviewedA Working Group has reviewed this and made a recommendationhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Reviewed%22
Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorshttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Up-for-Grabs%22
Resolution-No ActivityIssue has had no activity for 6 months or morehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-No%20Activity%22
on Feb 15, 2025https://github.com/PowerShell/PowerShell/issues/10231#event-16322541024
Mathias R. Jessen (IISResetMe)https://github.com/IISResetMe
on Feb 15, 2025https://github.com/PowerShell/PowerShell/issues/10231#event-16322545024
https://github.com/apps/microsoft-github-policy-service
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
on Aug 15, 2025https://github.com/PowerShell/PowerShell/issues/10231#issuecomment-3190653396
Microsoft GitHub Policy Servicehttps://aka.ms/1es-gitops
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
Resolution-No ActivityIssue has had no activity for 6 months or morehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-No%20Activity%22
on Aug 15, 2025https://github.com/PowerShell/PowerShell/issues/10231#event-19171341802
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
completedhttps://github.com/PowerShell/PowerShell/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Aug 22, 2025https://github.com/PowerShell/PowerShell/issues/10231#event-19283331474
Sign up for freehttps://github.com/signup?return_to=https://github.com/PowerShell/PowerShell/issues/10231
Sign in to commenthttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/10231
Mathias R. Jessen (IISResetMe)https://github.com/IISResetMe
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get ahttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Question%22
Resolution-No ActivityIssue has had no activity for 6 months or morehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-No%20Activity%22
Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorshttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Up-for-Grabs%22
WG-Enginecore PowerShell engine, interpreter, and runtimehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine%22
WG-ReviewedA Working Group has reviewed this and made a recommendationhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Reviewed%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.