Skip to content

Commit d33691f

Browse files
authored
Merge pull request #727 from auduchinok/master
Add IsValCompiledAsMethod to FSharpMemberOrFunctionOrValue
2 parents e61fc4f + bc9481f commit d33691f

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/fsharp/IlxGen.fsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,4 @@ type public IlxAssemblyGenerator =
8282

8383

8484
val ReportStatistics : TextWriter -> unit
85+
val IsValCompiledAsMethod : TcGlobals -> Val -> bool

src/fsharp/vs/Symbols.fs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,6 +1720,11 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) =
17201720

17211721
member x.Data = d
17221722

1723+
member x.IsValCompiledAsMethod =
1724+
match d with
1725+
| V valRef -> IlxGen.IsValCompiledAsMethod cenv.g valRef.Deref
1726+
| _ -> false
1727+
17231728
override x.Equals(other : obj) =
17241729
box x === other ||
17251730
match other with

src/fsharp/vs/Symbols.fsi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,9 @@ and [<Class>] FSharpMemberOrFunctionOrValue =
798798
/// Get the accessibility information for the member, function or value
799799
member Accessibility : FSharpAccessibility
800800

801+
/// Indicated if this is a value compiled to a method
802+
member IsValCompiledAsMethod : bool
803+
801804

802805
/// A subtype of FSharpSymbol that represents a parameter
803806
and [<Class>] FSharpParameter =

0 commit comments

Comments
 (0)