From bc9481fce02de882fdf5c2503b427e2f90715156 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Mon, 20 Mar 2017 14:30:27 +0300 Subject: [PATCH] Add IsValCompiledAsMethod to FSharpMemberOrFunctionOrValue --- src/fsharp/IlxGen.fsi | 1 + src/fsharp/vs/Symbols.fs | 5 +++++ src/fsharp/vs/Symbols.fsi | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/fsharp/IlxGen.fsi b/src/fsharp/IlxGen.fsi index 45d10b9ff6..94cccee587 100755 --- a/src/fsharp/IlxGen.fsi +++ b/src/fsharp/IlxGen.fsi @@ -82,3 +82,4 @@ type public IlxAssemblyGenerator = val ReportStatistics : TextWriter -> unit +val IsValCompiledAsMethod : TcGlobals -> Val -> bool diff --git a/src/fsharp/vs/Symbols.fs b/src/fsharp/vs/Symbols.fs index 7396d9f0c7..528812ed38 100644 --- a/src/fsharp/vs/Symbols.fs +++ b/src/fsharp/vs/Symbols.fs @@ -1720,6 +1720,11 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = member x.Data = d + member x.IsValCompiledAsMethod = + match d with + | V valRef -> IlxGen.IsValCompiledAsMethod cenv.g valRef.Deref + | _ -> false + override x.Equals(other : obj) = box x === other || match other with diff --git a/src/fsharp/vs/Symbols.fsi b/src/fsharp/vs/Symbols.fsi index e21cf66b7a..5b2ccefbbb 100644 --- a/src/fsharp/vs/Symbols.fsi +++ b/src/fsharp/vs/Symbols.fsi @@ -798,6 +798,9 @@ and [] FSharpMemberOrFunctionOrValue = /// Get the accessibility information for the member, function or value member Accessibility : FSharpAccessibility + /// Indicated if this is a value compiled to a method + member IsValCompiledAsMethod : bool + /// A subtype of FSharpSymbol that represents a parameter and [] FSharpParameter =