Skip to content

RCS1229 false positive with ValueTask #1617

@antoinebj

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)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions