Skip to content

RCS1229 false positive with ValueTask #1617

Description

@antoinebj

Similar to #821 but for ValueTask

The following code triggers RCS1229, which disappears if the return type is changed to Task:

public static class Rcs1229Repro
{
    public static ValueTask Foo()
    {
        using var memoryStream = new MemoryStream();

        return ValueTask.CompletedTask;
    }
}

(btw there's a typo in the method name here, there is a second "Or" instead of "Of" in IsTaskOrTaskOrT)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions