dotnet / dotnet/fsharp

Make error FS1113 (less accessible symbol from inline function) more specific.

Open
#8,349 0 comments 3 reactions 0 assignees View on GitHub
Area-Diagnostics Feature Request
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

Consider the following pieve of code:

``` fsharp
module InlineTest

let private pi() = 3.

let inline radius r = 2. * (pi()) * r
```

Compilation rightly fails with

```
error FS1113: The value 'radius' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible
```

But the message does not indicate in any way _which_ not sufficiently accessible function was used.

The same error happens when a not sufficiently accessible type _alias_ (not concrete type) was used, further confusing the developer into looking for a "function", where the culprit is a type alias.

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.