resharper-fsharp icon indicating copy to clipboard operation
resharper-fsharp copied to clipboard

inline function uses a private function is a compile error but IDE doesn't show it

Open DunetsNM opened this issue 3 years ago • 1 comments

Repro:

module InlineTest =
    let private innerFunc x = x + 1
    let inline inlineFunc x = (innerFunc x) + 1


[<EntryPoint>]
let main _argv =
    InlineTest.inlineFunc 7 |> ignore
    0

It expectedly gives a compilation error:

Program.fs(3, 16): [FS1113] The value 'inlineFunc' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible

But the IDE doesn't highlight the error (Rider 2021.1.3)

DunetsNM avatar Jun 10 '21 00:06 DunetsNM

Thanks for the report! It looks like it's about FSharp.Compiler.Service, which provides error information to the IDE. I've created another issue on their repo.

DedSec256 avatar Jun 12 '21 17:06 DedSec256