Skip to content

Commit 579961f

Browse files
authored
Don't suppress inline keyword in GetValSignatureText. (#15827)
1 parent 475746a commit 579961f

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/Compiler/Symbols/Symbols.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2357,7 +2357,7 @@ type FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) =
23572357

23582358
member x.GetValSignatureText (displayContext: FSharpDisplayContext, m: range) =
23592359
checkIsResolved()
2360-
let displayEnv = { displayContext.Contents cenv.g with includeStaticParametersInTypeNames = true }
2360+
let displayEnv = { displayContext.Contents cenv.g with includeStaticParametersInTypeNames = true; suppressInlineKeyword = false }
23612361

23622362
let stringValOfMethInfo (methInfo: MethInfo) =
23632363
match methInfo with

tests/service/Symbols.fs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,21 @@ type Foo() =
752752
and set (a: int) (b: float) = ()
753753
"""
754754
(5, 14, " member _.X", "X")
755-
755+
756+
[<Test>]
757+
let ``Signature text for inline property`` () =
758+
assertSignature
759+
"member inline Item: i: int * j: char -> string with get\nmember inline Item: i: int * j: char -> string with set"
760+
"""
761+
module Meh
762+
763+
type Foo =
764+
member inline this.Item
765+
with get (i:int,j: char) : string = ""
766+
and set (i:int,j: char) (x:string) = printfn "%i %c" i j
767+
"""
768+
(5, 27, " member inline this.Item", "Item")
769+
756770
module AnonymousRecord =
757771
[<Test>]
758772
let ``Anonymous record copy-and-update symbols usage`` () =

0 commit comments

Comments
 (0)