Skip to content

Commit

Permalink
cleanup in service (#5724)
Browse files Browse the repository at this point in the history
  • Loading branch information
forki authored and KevinRansom committed Oct 2, 2018
1 parent 933352a commit 2948313
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fsharp/service/service.fs
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ type TypeCheckInfo
// These come through as an empty plid and residue "". Otherwise we try an environment lookup
// and then return to the qualItems. This is because the expression typings are a little inaccurate, primarily because
// it appears we're getting some typings recorded for non-atomic expressions like "f x"
when (match plid with [] -> true | _ -> false) ->
when isNil plid ->
// lookup based on expression typings successful
Some (items |> List.map (CompletionItem (tryDestAppTy g ty) None), denv, m)
| GetPreciseCompletionListFromExprTypingsResult.NoneBecauseThereWereTypeErrors, _ ->
Expand All @@ -700,7 +700,7 @@ type TypeCheckInfo
| GetPreciseCompletionListFromExprTypingsResult.NoneBecauseTypecheckIsStaleAndTextChanged, _ ->
// we want to report no result and let second-chance intellisense kick in
None
| _, true when (match plid with [] -> true | _ -> false) ->
| _, true when isNil plid ->
// If the user just pressed '.' after an _expression_ (not a plid), it is never right to show environment-lookup top-level completions.
// The user might by typing quickly, and the LS didn't have an expression type right before the dot yet.
// Second-chance intellisense will bring up the correct list in a moment.
Expand Down

0 comments on commit 2948313

Please sign in to comment.