Skip to content

ref structs get code cleaned to internal struct, dropping the ref #708

@lcsondes

Description

@lcsondes

Environment

  • Visual Studio version: 2019 Community
  • CodeMaid version: 11.1
  • Code language: C#

Description

using System;

ref struct Bug // This will get code cleaned to internal struct, which won't compile
{
    private Span<int> x;
}

internal class Program
{
    public static void Main()
    {
    }
}

Steps to recreate

Code cleanup the above code snippet.

Current behavior

ref struct is changed to internal struct. This is a breaking change even if it didn't contain a Span<T>.

In the case of ref readonly struct it gets cleaned to ref readonly internal struct which does not compile either.

Expected behavior

Not breaking the code.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions