dotnet / dotnet/fsharp

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

Open
#18,974 2 comments 0 reactions 0 assignees View on GitHub
Area-Compiler-Checking Bug
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

**Repro steps**
```fsharp
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.