dotnet / dotnet/roslyn

Check if ModuleCancellationInstrumenter gracefully handles ref kind differences between original and replacement methods

Open
#74,393 1 comment 0 reactions 1 assignee Claimed by @tmat View on GitHub
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

I am wondering if any unexpected behavior changes could occur if:
- the original method was a `readonly` struct method and the replacement method was not, for example.
- Or, the other way around, the original is non-readonly and the replacement is readonly.

Since it seems like we are not checking the readonly-ness of the `this` parameter in these checks.

Since this PR is already merged some time ago, I will open a new issue based on this comment.

_Originally posted by @RikkiGibson in https://github.com/dotnet/roslyn/pull/71896#discussion_r1678293932_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.