From 9a83be18bec5aca1769ea982167c076451d8db72 Mon Sep 17 00:00:00 2001 From: nojaf Date: Mon, 21 Aug 2023 13:34:42 +0200 Subject: [PATCH] Don't suppress inline keyword in GetValSignatureText. --- src/Compiler/Symbols/Symbols.fs | 2 +- tests/service/Symbols.fs | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Compiler/Symbols/Symbols.fs b/src/Compiler/Symbols/Symbols.fs index 462e2041ed7..e59caf2c6d4 100644 --- a/src/Compiler/Symbols/Symbols.fs +++ b/src/Compiler/Symbols/Symbols.fs @@ -2357,7 +2357,7 @@ type FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = member x.GetValSignatureText (displayContext: FSharpDisplayContext, m: range) = checkIsResolved() - let displayEnv = { displayContext.Contents cenv.g with includeStaticParametersInTypeNames = true } + let displayEnv = { displayContext.Contents cenv.g with includeStaticParametersInTypeNames = true; suppressInlineKeyword = false } let stringValOfMethInfo (methInfo: MethInfo) = match methInfo with diff --git a/tests/service/Symbols.fs b/tests/service/Symbols.fs index 18a8b208fbf..59ac5b9b84f 100644 --- a/tests/service/Symbols.fs +++ b/tests/service/Symbols.fs @@ -752,7 +752,21 @@ type Foo() = and set (a: int) (b: float) = () """ (5, 14, " member _.X", "X") - + + [] + let ``Signature text for inline property`` () = + assertSignature + "member inline Item: i: int * j: char -> string with get\nmember inline Item: i: int * j: char -> string with set" + """ +module Meh + +type Foo = + member inline this.Item + with get (i:int,j: char) : string = "" + and set (i:int,j: char) (x:string) = printfn "%i %c" i j +""" + (5, 27, " member inline this.Item", "Item") + module AnonymousRecord = [] let ``Anonymous record copy-and-update symbols usage`` () =