File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
fcs/FSharp.Compiler.Service.Tests Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -440,6 +440,6 @@ module Test =
440440 }
441441"""
442442 let quickInfo = GetQuickInfoTextFromCode code
443- let expected = " property MyDistance.asNautical: MyDistance"
443+ let expected = " property MyDistance.asNautical: MyDistance with get "
444444 Assert.AreEqual( expected, quickInfo)
445445 ()
Original file line number Diff line number Diff line change @@ -1405,12 +1405,24 @@ module InfoMemberPrinting =
14051405 | None -> tagProperty
14061406 | Some vref -> tagProperty >> mkNav vref.DefinitionRange
14071407 let nameL = DemangleOperatorNameAsLayout tagProp pinfo.PropertyName
1408+ let getterSetter =
1409+ match pinfo.HasGetter, pinfo.HasSetter with
1410+ | ( true , false ) ->
1411+ wordL ( tagKeyword " with" ) ^^ wordL ( tagText " get" )
1412+ | ( false , true ) ->
1413+ wordL ( tagKeyword " with" ) ^^ wordL ( tagText " set" )
1414+ | ( true , true ) ->
1415+ wordL ( tagKeyword " with" ) ^^ wordL ( tagText " get, set" )
1416+ | ( false , false ) ->
1417+ emptyL
1418+
14081419 wordL ( tagText ( FSComp.SR.typeInfoProperty())) ^^
14091420 layoutTyconRef denv pinfo.ApparentEnclosingTyconRef ^^
14101421 SepL.dot ^^
14111422 nameL ^^
14121423 RightL.colon ^^
1413- layoutType denv rty
1424+ layoutType denv rty ^^
1425+ getterSetter
14141426
14151427 let formatMethInfoToBufferFreeStyle amap m denv os ( minfo : MethInfo ) =
14161428 let _ , resL = prettyLayoutOfMethInfoFreeStyle amap m denv emptyTyparInst minfo
You can’t perform that action at this time.
0 commit comments