Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions docs/release-notes/.FSharp.Compiler.Service/8.0.300.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* Enforce AttributeTargets on enums ([PR #16887](https://github.com/dotnet/fsharp/pull/16887))
* Completion: fix for unfinished record field decl ([PR #16893](https://github.com/dotnet/fsharp/pull/16893))
* Enforce AttributeTargets on delegates ([PR #16891](https://github.com/dotnet/fsharp/pull/16891))
* Completion: fix completion in empty dot lambda prefix ([#16829](https://github.com/dotnet/fsharp/pull/16829))
* Fix StackOverflow when checking non-recursive bindings in module or namespace in `fscAnyCpu`/`fsiAnyCpu`. ([PR #16908](https://github.com/dotnet/fsharp/pull/16908))

### Added
Expand Down
2 changes: 2 additions & 0 deletions src/Compiler/SyntaxTree/SyntaxTreeOps.fs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ let rec pushUnaryArg expr arg =
| SynExpr.TypeApp(innerExpr, mLess, tyargs, mCommas, mGreater, mTypars, m) ->
let innerExpr = pushUnaryArg innerExpr arg
SynExpr.TypeApp(innerExpr, mLess, tyargs, mCommas, mGreater, mTypars, m)
| SynExpr.ArbitraryAfterError(_, m) when m.Start = m.End ->
SynExpr.DiscardAfterMissingQualificationAfterDot(SynExpr.Ident arg, m.StartRange, unionRanges arg.idRange m)
| _ ->
errorR (Error(FSComp.SR.tcDotLambdaAtNotSupportedExpression (), expr.Range))
expr
Expand Down
8 changes: 8 additions & 0 deletions tests/service/CompletionTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ let myFancyFunc (x:string) =
|> _.ToL"""
assertHasItemWithNames ["ToLower"] info

[<Test>]
let ``Underscore dot lambda - No prefix`` () =
let info = getCompletionInfo "[s] |> List.map _. " (3, 18) """
let s = ""
[s] |> List.map _.
"""
assertHasItemWithNames ["Length"] info

[<Test>]
let ``Type decl - Record - Field type 01`` () =
let info = getCompletionInfo "type Record = { Field: }" (2, 23) """
Expand Down