Skip to content

Commit

Permalink
Add test for type nested in another generic type
Browse files Browse the repository at this point in the history
Issue: Incorrect type format: ``ImmutableArray`1.Builder<int>`` instead of ``ImmutableArray<int>.Builder``
//TODO: how to format correctly?
  • Loading branch information
Booksbaum committed May 16, 2022
1 parent fc6ca7a commit 72403d6
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions test/FsAutoComplete.Tests.Lsp/InlayHintTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,37 @@ let private typeHintTests state =
let f (beta: int) = beta + 1
"""
]
testCaseAsync "can show type for generic actual type" <|
checkAllInMarkedRange server
"""
open System.Collections.Generic
$|let list$0 = List<int>()$|
list.Add 2
"""
[
typeHint "List<int>"
"""
open System.Collections.Generic
let list: List<int> = List<int>()
list.Add 2
"""
]
ptestCaseAsync "can show type hint for nested inside generic actual type" <|
checkAllInMarkedRange server
"""
open System.Collections.Immutable
$|let arr$0 = ImmutableArray.CreateBuilder()$|
arr.Add 2
"""
[
//Currently: `ImmutableArray`1.Builder<int>`
typeHint "ImmutableArray<int>.Builder"
"""
open System.Collections.Immutable
let arr: ImmutableArray<int>.Builder = ImmutableArray.CreateBuilder()
arr.Add 2
"""
]
])
let private mixedHintTests state =
serverTestList "inlay hints" state defaultConfigDto None (fun server -> [
Expand Down

0 comments on commit 72403d6

Please sign in to comment.