Skip to content

CS0177 is not reported on method with unassigned out parameter when calling extern local function #79437

@just-ero

Description

@just-ero

Full issue information + repro project:
https://github.com/just-ero/roslyn-issues-repros/tree/main/5.0.0/004_AssignOutParameter_ExternLocalFunction

Version

Note

Roslyn: 5.0.0-1.25361.2 (fdd628a)
.NET SDK: 10.0.100-preview.6.25358.103

Visual Studio Code: 1.102.1
C# Extension: 2.86.19
C# Dev Kit Extension: 1.40.25

Steps to Reproduce

  1. Add the following code wherever syntactically applicable:
    class C
    {
        void M(out int i)
        {
            f();
    
            static extern void f();
        }
    }

Expected Behavior

CS0177 is reported on M.

Actual Behavior

It is not.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions