Skip to content

Inline methods break in types with self identifier with misleading error message #18974

@steveisaac

Description

@steveisaac

Repro steps

type Test() as _self =
    member inline this.InlineMethod() = ()

Expected behavior

The above compiles or emits a useful error message.

Actual behavior
The following error is emitted The value 'InlineMethod' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible

Related information
.NET 9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingBug

    Type

    Projects

    Status

    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions