Skip to content

Commit ec3e347

Browse files
Fixed issue with crashing provider on nested types
1 parent ca00f5a commit ec3e347

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

FSharp.Interactive.Intellisence.Lib/AutocompleteProvider.fs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,13 @@ module AutocompleteProvider =
7575
let getVariableNames(fsiAssembly:Assembly) =
7676
fsiAssembly.GetTypes()//FSI types have the name pattern FSI_####, where #### is the order in which they were created
7777
|> Seq.filter (fun ty -> ty.Name.StartsWith("FSI_"))
78-
|> Seq.sortBy (fun ty -> ty.Name.Split('_').[1] |> int)
7978
|> Seq.collect (fun ty -> getPropertyInfosForType(ty))
8079
|> Seq.map (fun pi -> pi.Name)
8180
|> Seq.distinct
8281

8382
let getVariableTypeByName(fsiAssembly:Assembly, name:String) =
8483
fsiAssembly.GetTypes()//FSI types have the name pattern FSI_####, where #### is the order in which they were created
8584
|> Seq.filter (fun ty -> ty.Name.StartsWith("FSI_"))
86-
|> Seq.sortBy (fun ty -> ty.Name.Split('_').[1] |> int)
8785
|> Seq.collect (fun ty -> getPropertyInfosForType(ty))
8886
|> Seq.tryFind (fun pi -> pi.Name.Equals(name, StringComparison.Ordinal))
8987
|> Option.map (fun pi -> pi.PropertyType)

0 commit comments

Comments
 (0)