Skip to content

Assert failure in Binder.CheckValue() compiling discarded ref assignment #63446

@cston

Description

@cston

Compile the following with a DEBUG build:

class Program
{
    static ref int F()
    {
        throw null;
    }

    static void Main()
    {
        _ = ref F();
    }
}

Result: Debug.Assert() failure in Binder.CheckValue() - see Binder.ValueChecks.cs#L263.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions