Arguments of extern function are always flagged as unused by intellisense.
ref ionide/ionide-vscode-fsharp#727
Repro steps
Normal netcoreapp2.0 console app with
open System
open System.Runtime.InteropServices
let private add x y = x + y
[<DllImport("abc.dll", CallingConvention = CallingConvention.Cdecl, CharSet=CharSet.Ansi)>]
extern IntPtr private test1 (string procname)
[<DllImport("abc.dll", CallingConvention = CallingConvention.Cdecl, CharSet=CharSet.Ansi)>]
extern IntPtr test2 (string procname)
[<EntryPoint>]
let main _args =
test2("dad") |> ignore
0
Expected behavior
the test1 that is unused and private (or internal), should be flagged as unused like
the add function
the test2 is used, no unused warning
Actual behavior
Both have the arguments flagged as unused. private/internal doesnt change as modifier

Known workarounds
None.
Related information
- Operating system: Windows 10
Microsoft Visual Studio Enterprise 2017
Version 15.6.1
VisualStudio.15.Release/15.6.1+27428.2002
Microsoft .NET Framework
Version 4.7.02556
Installed Version: Enterprise
Visual F# Tools 10.1 for F# 4.1 00369-60000-00001-AA834
Microsoft Visual F# Tools 10.1 for F# 4.1
Arguments of
externfunction are always flagged as unused by intellisense.ref ionide/ionide-vscode-fsharp#727
Repro steps
Normal
netcoreapp2.0console app withExpected behavior
the
test1that is unused and private (or internal), should be flagged as unused likethe
addfunctionthe
test2is used, no unused warningActual behavior
Both have the arguments flagged as unused.
private/internaldoesnt change as modifierKnown workarounds
None.
Related information