@@ -1255,7 +1255,7 @@ module PrintTastMemberOrVals =
12551255
12561256 let mkInlineL denv ( v : Val ) nameL =
12571257 if v.MustInline && not denv.suppressInlineKeyword then
1258- wordL ( tagKeyword " inline " ) ++ nameL
1258+ WordL.keywordInline ++ nameL
12591259 else
12601260 nameL
12611261
@@ -1326,6 +1326,7 @@ module PrintTastMemberOrVals =
13261326 // use error recovery because intellisense on an incomplete file will show this
13271327 errorR( Error( FSComp.SR.tastInvalidFormForPropertyGetter(), vref.Id.idRange))
13281328 let nameL = layoutMemberName denv vref [] argInfos tagProperty vref.DisplayNameCoreMangled
1329+ let nameL = if short then nameL else mkInlineL denv vref.Deref nameL
13291330 let resL =
13301331 if short then nameL --- ( WordL.keywordWith ^^ WordL.keywordGet)
13311332 else stat --- nameL --- ( WordL.keywordWith ^^ WordL.keywordGet)
@@ -1342,6 +1343,7 @@ module PrintTastMemberOrVals =
13421343 else tauL --- ( WordL.keywordWith ^^ WordL.keywordGet)
13431344 else
13441345 let nameL = layoutMemberName denv vref niceMethodTypars argInfos tagProperty vref.DisplayNameCoreMangled
1346+ let nameL = if short then nameL else mkInlineL denv vref.Deref nameL
13451347 stat --- (( nameL |> addColonL) ^^ ( if isNil argInfos then tauL else tauL --- ( WordL.keywordWith ^^ WordL.keywordGet)))
13461348 prettyTyparInst, resL
13471349
@@ -1350,6 +1352,7 @@ module PrintTastMemberOrVals =
13501352 // use error recovery because intellisense on an incomplete file will show this
13511353 errorR( Error( FSComp.SR.tastInvalidFormForPropertySetter(), vref.Id.idRange))
13521354 let nameL = layoutMemberName denv vref [] argInfos tagProperty vref.DisplayNameCoreMangled
1355+ let nameL = if short then nameL else mkInlineL denv vref.Deref nameL
13531356 let resL = stat --- nameL --- ( WordL.keywordWith ^^ WordL.keywordSet)
13541357 emptyTyparInst, resL
13551358 else
@@ -1361,6 +1364,7 @@ module PrintTastMemberOrVals =
13611364 ( tauL --- ( WordL.keywordWith ^^ WordL.keywordSet))
13621365 else
13631366 let nameL = layoutMemberName denv vref niceMethodTypars curriedArgInfos tagProperty vref.DisplayNameCoreMangled
1367+ let nameL = if short then nameL else mkInlineL denv vref.Deref nameL
13641368 stat --- (( nameL |> addColonL) ^^ ( tauL --- ( WordL.keywordWith ^^ WordL.keywordSet)))
13651369 prettyTyparInst, resL
13661370
@@ -1817,22 +1821,26 @@ module TastDefinitionPrinting =
18171821 | Some gRef, Some sRef -> isPublicAccess gRef.Accessibility && isPublicAccess sRef.Accessibility
18181822 | _ -> false
18191823
1820- let (| MixedAccessibilityGetterAndSetter | _ |) ( pinfo : PropInfo ) =
1824+ let (| DifferentGetterAndSetter | _ |) ( pinfo : PropInfo ) =
18211825 if not ( pinfo.HasGetter && pinfo.HasSetter) then
18221826 None
18231827 else
18241828 match pinfo.GetterMethod.ArbitraryValRef, pinfo.SetterMethod.ArbitraryValRef with
18251829 | Some getValRef, Some setValRef ->
1826- if getValRef.Accessibility = setValRef.Accessibility then
1827- None
1828- else
1830+ if getValRef.Accessibility <> setValRef.Accessibility then
18291831 Some ( getValRef, setValRef)
1832+ else
1833+ match getValRef.ValReprInfo with
1834+ | Some getValReprInfo when
1835+ // Getter has an index parameter
1836+ getValReprInfo.TotalArgCount > 1 -> Some ( getValRef, setValRef)
1837+ | _ -> None
18301838 | _ -> None
18311839
18321840 match pinfo.ArbitraryValRef with
18331841 | Some vref ->
18341842 match pinfo with
1835- | MixedAccessibilityGetterAndSetter ( getValRef, setValRef) ->
1843+ | DifferentGetterAndSetter ( getValRef, setValRef) ->
18361844 let getSuffix = if pinfo.IsIndexer then emptyL else wordL ( tagKeyword " with" ) ^^ wordL ( tagText " get" )
18371845 [
18381846 PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv infoReader getValRef ^^ getSuffix
0 commit comments