Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

@MichalStrehovsky
Copy link
Member

It's unclear why this was disallowed - we allow them in method signatures and there's a comment a couple lines below the code I'm touching saying we thought about blocking this for byref-like types, but there's no reason to do that.

TypedReference is the original byref-like type.

Fixes #25697.

It's unclear why this was disallowed - we allow them in method signatures and there's a comment a couple lines below the code I'm touching saying we thought about blocking this for byref-like types, but there's no reason to do that.

`TypedReference` is the original byref-like type.
Copy link
Member

@VSadov VSadov left a comment

Choose a reason for hiding this comment

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

Indeed, C# may disallow ref TypedReference for historical reasons, but TypedReference* is clearly supported.

@VSadov
Copy link
Member

VSadov commented Jul 23, 2019

C# could allow ref TypedReference now by using the same escape analysis as with other ref-like types, but that would have compat issues, It was easier to leave TypeReference rules unchanged.

Anyways - no reason to disallow in the runtime.

@MichalStrehovsky MichalStrehovsky merged commit 2354d0b into dotnet:master Jul 23, 2019
@MichalStrehovsky MichalStrehovsky deleted the fix25697 branch July 23, 2019 12:14
monojenkins pushed a commit to monojenkins/mono that referenced this pull request Aug 7, 2020
…eflection.

CoreCLR gained support for creating`TypedReference *` and `TypedReference &` via `MakePointerType` and `MakeByRefType` in dotnet/coreclr#25817.

Reenable byref System.Void-related reflection tests.

Fixes dotnet/runtime#31713.
Fixes dotnet/runtime#37489.
imhameed added a commit to dotnet/runtime that referenced this pull request Aug 7, 2020
…eflection. (#40472)

CoreCLR gained support for creating`TypedReference *` and `TypedReference &` via `MakePointerType` and `MakeByRefType` in dotnet/coreclr#25817.

Reenable byref System.Void-related reflection tests.

Fixes #31713.
Fixes #37489.
imhameed added a commit to mono/mono that referenced this pull request Aug 7, 2020
…eflection. (#20221)

CoreCLR gained support for creating`TypedReference *` and `TypedReference &` via `MakePointerType` and `MakeByRefType` in dotnet/coreclr#25817.

Reenable byref System.Void-related reflection tests.

Fixes dotnet/runtime#31713.
Fixes dotnet/runtime#37489.

Co-authored-by: imhameed <[email protected]>
Jacksondr5 pushed a commit to Jacksondr5/runtime that referenced this pull request Aug 10, 2020
…eflection. (dotnet#40472)

CoreCLR gained support for creating`TypedReference *` and `TypedReference &` via `MakePointerType` and `MakeByRefType` in dotnet/coreclr#25817.

Reenable byref System.Void-related reflection tests.

Fixes dotnet#31713.
Fixes dotnet#37489.
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
It's unclear why this was disallowed - we allow them in method signatures and there's a comment a couple lines below the code I'm touching saying we thought about blocking this for byref-like types, but there's no reason to do that.

`TypedReference` is the original byref-like type.

Commit migrated from dotnet/coreclr@2354d0b
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MissingMethodException when pointer to TypedReference is used

3 participants