Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inferred type name hints #118

Open
wants to merge 58 commits into
base: net211
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
ea0c37b
Update InferredTypeCodeVisionProvider.fs
saul Mar 30, 2020
cef15fa
Split into PipeChainCodeVisionProvider
saul Mar 30, 2020
c60867a
Create Multi line.fs.gold
saul Mar 30, 2020
73c12bb
Hook into the tooltip for the |> operator
saul Mar 30, 2020
ff0b40c
Update Multi line.fs.gold
saul Mar 30, 2020
88520c1
Add TypeHintsAdornmentProvider
saul Mar 30, 2020
c12814b
Update TypeHintsAdornmentProvider.fs
saul Mar 30, 2020
b224f68
Update TypeHintsAdornmentProvider.fs
saul Mar 30, 2020
9521a2e
Markups
saul Mar 30, 2020
d67e92c
Update TypeHintsAdornmentProvider.fs
saul Mar 30, 2020
61d3ef3
Add more tests
saul Mar 30, 2020
69145e5
Add new lines
saul Mar 30, 2020
1fa07ac
Add setting
saul Mar 31, 2020
37465f6
Update TypeHintAdornmentStage.fs
saul Mar 31, 2020
cc23ca5
Add option to 'Hide when |> is on same line as argument'
saul Apr 1, 2020
89808fe
Invalidate highlighting on type hint setting change
saul Apr 1, 2020
6a33f80
Update TypeHintAdornmentStage.fs
saul Apr 1, 2020
0418681
Update TypeHintAdornmentStage.fs
saul Apr 2, 2020
6c03c7c
Use {HideSameLine:All} in tests
saul Apr 2, 2020
2312f7b
Add InferredTypeHintHighlightingProcess
saul Apr 2, 2020
be94166
Reorganisation
saul Apr 2, 2020
a718242
Delete ReSharper.FSharp.sln.DotSettings.user
saul Apr 2, 2020
1b7ab5c
Merge branch 'net201-pipe-chain-insight' into net201-local-ref-pat-hints
saul Apr 2, 2020
1e49dea
Add tests
saul Apr 2, 2020
7647371
Put && on end of life
saul Apr 2, 2020
6e15e68
Code style
saul Apr 2, 2020
cf32c8f
Merge branch 'net201-pipe-chain-insight' into net201-local-ref-pat-hints
saul Apr 2, 2020
d2ab70e
Update InferredTypeHintStage.fs
saul Apr 2, 2020
778d7d1
More code style changes
saul Apr 2, 2020
780727d
Merge branch 'net201-pipe-chain-insight' into net201-local-ref-pat-hints
saul Apr 2, 2020
3c65b47
Merge remote-tracking branch 'upstream/net202' into net201-local-ref-…
saul Apr 29, 2020
98615c5
Merge remote-tracking branch 'upstream/net202' into net201-pipe-chain…
saul Apr 29, 2020
6dfe786
Markups
saul Apr 29, 2020
054b671
Merge branch 'net201-pipe-chain-insight' into net201-local-ref-pat-hints
saul Apr 29, 2020
008009b
Markups, add more tests
saul Apr 29, 2020
59d94b7
Add parameter name hints
saul Apr 29, 2020
e955162
Resolve todo
saul Apr 29, 2020
f26344d
Merge branch 'net202-parameter-name-hints' into net201-local-ref-pat-…
saul Apr 29, 2020
28c1297
Merge remote-tracking branch 'upstream/net202' into net201-local-ref-…
saul Apr 29, 2020
1353ac8
Revert "Merge branch 'net202-parameter-name-hints' into net201-local-…
saul Apr 29, 2020
8899fa6
Un-Fantomas
saul Apr 29, 2020
1c60fea
Delete accidentally committed file
saul Apr 29, 2020
7b7b052
Merge remote-tracking branch 'upstream/net202' into net201-local-ref-…
saul May 17, 2020
944627f
Hook into 'Type Name Hints' settings
saul May 23, 2020
f723c6a
Add more tests
saul May 23, 2020
91e6d5d
Add object expression and cast expression to tests
saul May 23, 2020
fc520a6
Merge remote-tracking branch 'upstream/net202' into net201-local-ref-…
saul May 23, 2020
7ed7095
Schedule hint-related stages after other long-running ones
auduchinok May 25, 2020
b66b010
Minor cleanup
auduchinok May 25, 2020
887b7df
Merge remote-tracking branch 'upstream/net202' into net201-local-ref-…
saul Jun 10, 2020
179406c
Markups
saul Jun 10, 2020
8b9dda5
Cleanup, safer getting pattern name
auduchinok Jun 11, 2020
296bcf6
Fix tests
auduchinok Jun 16, 2020
85c88a8
Merge remote-tracking branch 'upstream/net203' into net201-local-ref-…
saul Sep 30, 2020
9ff226e
API changes
saul Sep 30, 2020
e66d1da
Merge branch 'net203' into net201-local-ref-pat-hints
saul Oct 20, 2020
d767173
Merge branch 'net211' into net201-local-ref-pat-hints
auduchinok Jan 25, 2021
854a201
Update for newer APIs
auduchinok Jan 27, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ type FSharpOptionsPage
this.AddBoolOption((fun key -> key.FsiInteractiveEditor), RichText(FSharpExperimentalFeatures.fsiInteractiveEditor)) |> ignore

this.AddHeader("Type hints")
let showPipeReturnTypes = this.AddBoolOption((fun key -> key.ShowPipeReturnTypes), RichText(FSharpTypeHintOptions.pipeReturnTypes), null)
this.AddBoolOption((fun key -> key.ShowPipeReturnTypes), RichText(FSharpTypeHintOptions.pipeReturnTypes), null) |> ignore
do
use _x = this.Indent()
[
Expand All @@ -156,7 +156,7 @@ type FSharpOptionsPage
|> Seq.iter (fun checkbox ->
this.AddBinding(checkbox, BindingStyle.IsEnabledProperty, (fun key -> key.ShowPipeReturnTypes), id)
)

this.AddHeader("FSharp.Compiler.Service options")
this.AddBoolOption((fun key -> key.EnableReactorMonitor), RichText(enableFcsReactorMonitor), null) |> ignore
this.AddBoolOption((fun key -> key.BackgroundTypeCheck), RichText(backgroundTypeCheck), null) |> ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<Compile Include="src\Daemon\Stages\FSharpVcsCodeVisionRangesProviderStage.fs" />
<Compile Include="src\Daemon\Stages\FSharpErrorsStage.fs" />
<Compile Include="src\Daemon\Stages\PipeChainTypeHintStage.fs" />
<Compile Include="src\Daemon\Stages\InferredTypeHintStage.fs" />
<Compile Include="src\Daemon\Stages\InferredTypeCodeVisionProvider.fs" />
<Compile Include="src\Daemon\Stages\FSharpSyntaxHighlightingStage.fs" />
<Compile Include="src\Daemon\UsageChecking\FSharpUsageCheckingService.fs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@ open JetBrains.ReSharper.Feature.Services.Daemon
open JetBrains.TextControl.DocumentMarkup
open JetBrains.UI.RichText

[<DaemonIntraTextAdornmentProvider(typeof<TypeHintAdornmentProvider>)>]
[<StaticSeverityHighlighting(Severity.INFO,
typeof<HighlightingGroupIds.IntraTextAdornments>,
AttributeId = AnalysisHighlightingAttributeIds.PARAMETER_NAME_HINT,
OverlapResolve = OverlapResolveKind.NONE,
ShowToolTipInStatusBar = false)>]
type TypeHintHighlighting(typeNameString: string, range: DocumentRange) =
[<AbstractClass>]
type TypeHintHighlightingBase(typeNameString: string, range: DocumentRange, mode) =
let text = RichText(": " + typeNameString)

interface IHighlighting with
Expand All @@ -28,18 +23,19 @@ type TypeHintHighlighting(typeNameString: string, range: DocumentRange) =
member x.TestOutput = text.Text

member x.Text = text
member x.Mode = mode
member x.IsValid() = not text.IsEmpty && not range.IsEmpty

and [<SolutionComponent>] TypeHintAdornmentProvider() =
interface IHighlighterIntraTextAdornmentProvider with
member x.IsValid(highlighter) =
match highlighter.UserData with
| :? TypeHintHighlighting as dm -> dm.IsValid()
| :? TypeHintHighlightingBase as dm -> dm.IsValid()
| _ -> false

member x.CreateDataModel(highlighter) =
match highlighter.UserData with
| :? TypeHintHighlighting as thh ->
| :? TypeHintHighlightingBase as thh ->
{ new IIntraTextAdornmentDataModel with
override x.Text = thh.Text
override x.HasContextMenu = false
Expand All @@ -51,6 +47,26 @@ and [<SolutionComponent>] TypeHintAdornmentProvider() =
override x.IconId = null
override x.IsPreceding = false
override x.Order = 0
override x.InlayHintsMode = InlayHintsMode.Default
override x.InlayHintsMode = thh.Mode
}
| _ -> null


[<DaemonIntraTextAdornmentProvider(typeof<TypeHintAdornmentProvider>)>]
[<StaticSeverityHighlighting(Severity.INFO,
typeof<HighlightingGroupIds.IntraTextAdornments>,
AttributeId = AnalysisHighlightingAttributeIds.PARAMETER_NAME_HINT,
OverlapResolve = OverlapResolveKind.NONE,
ShowToolTipInStatusBar = false)>]
type TypeHintHighlighting(typeNameString: string, range: DocumentRange, mode) =
inherit TypeHintHighlightingBase(typeNameString, range, mode)


[<DaemonIntraTextAdornmentProvider(typeof<TypeHintAdornmentProvider>)>]
[<StaticSeverityHighlighting(Severity.INFO,
typeof<HighlightingGroupIds.IntraTextAdornments>,
AttributeId = AnalysisHighlightingAttributeIds.PARAMETER_NAME_HINT,
OverlapResolve = OverlapResolveKind.NONE,
ShowToolTipInStatusBar = false)>]
type PipeTypeHintHighlighting(typeNameString: string, range: DocumentRange) =
inherit TypeHintHighlightingBase(typeNameString, range, InlayHintsMode.Default)
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type InferredTypeCodeVisionProvider() =
member x.OnExtraActionClick(_, _, _) = ()


[<DaemonStage>]
[<DaemonStage(StagesBefore = [| typeof<FSharpErrorsStage> |])>]
type InferredTypeCodeVisionStage(provider: InferredTypeCodeVisionProvider) =
inherit FSharpDaemonStageBase()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
namespace JetBrains.ReSharper.Plugins.FSharp.Psi.Features.Daemon.Stages

open FSharp.Compiler.SourceCodeServices
open JetBrains.Application.InlayHints
open JetBrains.Application.Settings
open JetBrains.Application.Settings.WellKnownRootKeys
open JetBrains.ProjectModel
open JetBrains.ReSharper.Feature.Services.InlayHints
open JetBrains.ReSharper.Feature.Services.TypeNameHints
open JetBrains.ReSharper.Plugins.FSharp
open JetBrains.ReSharper.Plugins.FSharp.Psi.Features.Util
open JetBrains.ReSharper.Plugins.FSharp.Psi.Util
open JetBrains.ReSharper.Plugins.FSharp.Psi.Features.Daemon.Highlightings
open JetBrains.ReSharper.Plugins.FSharp.Psi.Impl
open JetBrains.ReSharper.Plugins.FSharp.Util
open JetBrains.ReSharper.Psi
open JetBrains.ReSharper.Psi.ExtensionsAPI
open JetBrains.ReSharper.Psi.Naming
open JetBrains.ReSharper.Psi.Naming.Impl
open JetBrains.ReSharper.Psi.Tree
open JetBrains.ReSharper.Feature.Services.Daemon
open JetBrains.ReSharper.Plugins.FSharp.Psi.Tree
open JetBrains.Util

[<SettingsKey(typeof<InlayHintsSettings>, "ReSharper F# Type Name Hints settings")>]
type FSharpTypeNameHintsOptions() =
inherit TypeNameHintsOptionsBase()

[<SettingsEntry(InlayHintsMode.PushToShowHints, "Visibility mode of type name hints for lambda expression parameters"); DefaultValue>]
val mutable ShowTypeNameHintsForLambdaExpressionParameters: InlayHintsMode

[<SettingsEntry(InlayHintsMode.PushToShowHints, "Visibility mode of type name hints for pattern matching expressions"); DefaultValue>]
val mutable ShowTypeNameHintsForVarDeclarationsInPatternMatchingExpressions: InlayHintsMode


type FSharpTypeNameHintHighlightingContext(settingsStore: IContextBoundSettingsStore) =
inherit TypeNameHintHighlightingContext<FSharpTypeNameHintsOptions>(settingsStore)

member val ShowTypeNameHintsForLambdaExpressionParameters =
settingsStore.GetValue(fun (options: FSharpTypeNameHintsOptions) ->
options.ShowTypeNameHintsForLambdaExpressionParameters)

member val ShowTypeNameHintsForVarDeclarationsInPatternMatchingExpressions =
settingsStore.GetValue(fun (options: FSharpTypeNameHintsOptions) ->
options.ShowTypeNameHintsForVarDeclarationsInPatternMatchingExpressions)


type LocalReferencePatternVisitor
(fsFile: IFSharpFile, context: FSharpTypeNameHintHighlightingContext, namingPolicyProvider, nameParser) =
inherit TreeNodeVisitor<IHighlightingConsumer * InlayHintsMode>()

let isTypeEvidentFromVariableNamePrefix (fcsType: FSharpType) (variableNameParts: string[]) =
variableNameParts.Length > 0 &&

match variableNameParts.[0] with
| IgnoreCase "has" | IgnoreCase "is" -> fcsType.MapType(EmptyList.InstanceList, fsFile.GetPsiModule()).IsBool()
| _ -> false

let isEvidentFromVariableName (fcsType: FSharpType) variableName =
if not context.HideTypeNameHintsWhenTypeNameIsEvidentFromVariableName then false else
if not fcsType.HasTypeDefinition then false else

let nameParts = NamesHelper.GetParts(nameParser, namingPolicyProvider, variableName)

let fcsEntity = fcsType.TypeDefinition
if isTypeEvidentFromVariableNamePrefix fcsType nameParts then true else

match fcsEntity.LogicalName with
| IgnoreCase variableName -> true
| typeName -> NamesHelper.IsLike(nameParts, NamesHelper.GetParts(nameParser, namingPolicyProvider, typeName))

let isTypeOfPatternEvident (pattern: IFSharpPattern) =

// v-- not evident
// x::y::z
// ^-- evident
let listConsPat = ListConsPatNavigator.GetByHeadPattern pattern
if isNotNull listConsPat then
isNotNull (ListConsPatNavigator.GetByTailPattern(listConsPat))

// x::y::z
// ^-- evident
elif isNotNull (ListConsPatNavigator.GetByTailPattern(pattern)) then
true else

// v-- not evident
// [x; y; z]
// ^--^-- evident
let listOrListPat = ArrayOrListPatNavigator.GetByPattern(pattern)
if isNotNull listOrListPat then
match Seq.tryHead listOrListPat.PatternsEnumerable with
| None -> false
| Some head -> head <> pattern
else
false

override x.VisitNode(node, context) =
for child in node.Children() do
match child with
| :? IFSharpTreeNode as treeNode -> treeNode.Accept(x, (context))
| _ -> ()

override x.VisitLocalReferencePat(localRefPat, (consumer, inlayHintsMode)) =
let pat = localRefPat.IgnoreParentParens()
if isNotNull (TypedPatNavigator.GetByPattern(pat)) then () else

let binding = BindingNavigator.GetByHeadPattern(pat)
if isNotNull binding && isNotNull binding.ReturnTypeInfo then () else

let variableName = localRefPat.SourceName
if variableName = SharedImplUtil.MISSING_DECLARATION_NAME then () else

if isTypeOfPatternEvident pat then () else

let symbolUse = localRefPat.GetFSharpSymbolUse()
if isNull symbolUse then () else

match symbolUse.Symbol with
| :? FSharpMemberOrFunctionOrValue as mfv when not (isEvidentFromVariableName mfv.FullType variableName) ->
let typeNameStr = symbolUse.DisplayContext.WithShortTypeNames(true) |> mfv.FullType.Format
let range = localRefPat.GetNavigationRange().EndOffsetRange()

// todo: TypeNameHintHighlighting can be used when RIDER-39605 is resolved
consumer.AddHighlighting(TypeHintHighlighting(typeNameStr, range, inlayHintsMode))
| _ -> ()

type InferredTypeHintHighlightingProcess
(fsFile, settings: IContextBoundSettingsStore, highlightingContext: FSharpTypeNameHintHighlightingContext,
namingManager: NamingManager, nameParser: NameParser, daemonProcess, isEnabled) =
inherit FSharpDaemonStageProcessBase(fsFile, daemonProcess)

let namingPolicyProvider = namingManager.Policy.GetPolicyProvider(fsFile.Language, fsFile.GetSourceFile())
let hideHintsForEvidentTypes = highlightingContext.HideTypeNameHintsForImplicitlyTypedVariablesWhenTypeIsEvident

let visitor = LocalReferencePatternVisitor(fsFile, highlightingContext, namingPolicyProvider, nameParser)

let visitLetBindings (letBindings: ILetBindings) consumer =
if highlightingContext.ShowTypeNameHintsForImplicitlyTypedVariables = InlayHintsMode.Never then () else

for binding in letBindings.Bindings do
if hideHintsForEvidentTypes && isTypeEvident binding.Expression then () else

match binding.HeadPattern with
| null -> ()
| headPat -> headPat.Accept(visitor, consumer)

override x.Execute(committer) =
if not isEnabled then
committer.Invoke(DaemonStageResult(EmptyArray.Instance, 0))
committer.Invoke(DaemonStageResult(EmptyArray.Instance, 1))
else
let consumer = FilteringHighlightingConsumer(daemonProcess.SourceFile, fsFile, settings)
fsFile.ProcessThisAndDescendants(Processor(x, consumer))
committer.Invoke(DaemonStageResult(consumer.Highlightings))

override x.VisitLetBindingsDeclaration(moduleDecl, consumer) =
visitLetBindings moduleDecl (consumer, InlayHintsMode.Default)

override x.VisitLetOrUseExpr(letOrUseExpr, consumer) =
visitLetBindings letOrUseExpr (consumer, InlayHintsMode.Default)

override x.VisitParametersPatternDeclaration(paramDecl, consumer) =
let inlayHintsMode = highlightingContext.ShowTypeNameHintsForImplicitlyTypedVariables
if inlayHintsMode <> InlayHintsMode.Never then
match paramDecl.Pattern with
| null -> ()
| pattern -> pattern.Accept(visitor, (consumer, inlayHintsMode))

override x.VisitMatchClause(matchClause, consumer) =
let inlayHintsMode = highlightingContext.ShowTypeNameHintsForVarDeclarationsInPatternMatchingExpressions
if inlayHintsMode <> InlayHintsMode.Never then
match matchClause.Pattern with
| null -> ()
| pattern -> pattern.Accept(visitor, (consumer, inlayHintsMode))

override x.VisitLambdaExpr(lambdaExpr, consumer) =
let inlayHintsMode = highlightingContext.ShowTypeNameHintsForLambdaExpressionParameters
if inlayHintsMode <> InlayHintsMode.Never then
for pattern in lambdaExpr.Patterns do
if isNotNull pattern then
pattern.Accept(visitor, (consumer, inlayHintsMode))


[<DaemonStage(StagesBefore = [| typeof<FSharpErrorsStage> |])>]
type InferredTypeHintStage(namingManager: NamingManager, nameParser: NameParser) =
inherit FSharpDaemonStageBase()

override x.IsSupported(sourceFile, processKind) =
processKind = DaemonProcessKind.VISIBLE_DOCUMENT &&
base.IsSupported(sourceFile, processKind) &&
not (sourceFile.LanguageType.Is<FSharpSignatureProjectFileType>())

override x.CreateStageProcess(fsFile, settings, daemonProcess) =
let context = FSharpTypeNameHintHighlightingContext(settings)

let isEnabled =
context.ShowTypeNameHintsForImplicitlyTypedVariables <> InlayHintsMode.Never ||
context.ShowTypeNameHintsForLambdaExpressionParameters <> InlayHintsMode.Never ||
context.ShowTypeNameHintsForVarDeclarationsInPatternMatchingExpressions <> InlayHintsMode.Never

InferredTypeHintHighlightingProcess(fsFile, settings, context, namingManager, nameParser, daemonProcess, isEnabled) :> _
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ type PipeChainHighlightingProcess(logger: ILogger, fsFile, settings: IContextBou
// Use EndOffsetRange to ensure the adornment appears at the end of multi-line expressions
let range = exprToAdorn.GetNavigationRange().EndOffsetRange()

highlightingConsumer.AddHighlighting(TypeHintHighlighting(returnTypeStr, range))
highlightingConsumer.AddHighlighting(PipeTypeHintHighlighting(returnTypeStr, range))
| _ -> ()

highlightingConsumer.Highlightings
Expand Down Expand Up @@ -137,7 +137,7 @@ type PipeChainHighlightingProcess(logger: ILogger, fsFile, settings: IContextBou

committer.Invoke(DaemonStageResult remainingHighlightings)

[<DaemonStage(StagesBefore = [| typeof<GlobalFileStructureCollectorStage> |])>]
[<DaemonStage(StagesBefore = [| typeof<FSharpErrorsStage> |])>]
type PipeChainTypeHintStage(logger: ILogger) =
inherit FSharpDaemonStageBase()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,21 @@ let setBindingExpression (expr: IFSharpExpression) contextIndent (letBindings: #
ModificationUtil.AddChildBefore(newExpr, NewLine(expr.GetLineEnding())) |> ignore
ModificationUtil.AddChildBefore(newExpr, Whitespace(contextIndent + indentSize)) |> ignore
shiftNode indentSize newExpr

let rec isTypeEvident (expr: IFSharpExpression) =
match expr.IgnoreInnerParens() with
| :? IObjExpr
| :? ICastExpr
| :? ILambdaExpr
| :? ILiteralExpr -> true

| :? ITupleExpr as tupleExpr ->
tupleExpr.Expressions |> Seq.forall isTypeEvident

| :? IArrayOrListExpr as arrayOrListExpr ->
match arrayOrListExpr.Expression with
| :? ISequentialExpr as seqExpr ->
isTypeEvident (seqExpr.ExpressionsEnumerable.FirstOrDefault())
| _ -> false

| _ -> false
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
let add () =
"hello there"

let l = fun () -> "hello there"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
let add () =
"hello there"

let l = fun () -> "hello there"

---------------------------------------------------------
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
let add x y =
x + y

let x = fun x y -> x + y
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ShowTypeNameHintsForLambdaExpressionParameters = True
let add x||(0) y||(1) =
x + y

let x = fun x||(2) y||(3) -> x + y

---------------------------------------------------------
(0): ReSharper Parameter Name Hint: : int
(1): ReSharper Parameter Name Hint: : int
(2): ReSharper Parameter Name Hint: : int
(3): ReSharper Parameter Name Hint: : int

================
ShowTypeNameHintsForLambdaExpressionParameters = False
let add x||(0) y||(1) =
x + y

let x = fun x y -> x + y

---------------------------------------------------------
(0): ReSharper Parameter Name Hint: : int
(1): ReSharper Parameter Name Hint: : int
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
let add x y =
15 + y

let l = fun x y -> 15 + y
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
let add x||(0) y||(1) =
15 + y

let l = fun x||(2) y||(3) -> 15 + y

---------------------------------------------------------
(0): ReSharper Parameter Name Hint: : 'a
(1): ReSharper Parameter Name Hint: : int
(2): ReSharper Parameter Name Hint: : 'a
(3): ReSharper Parameter Name Hint: : int
Loading