Skip to content

Commit 40683b2

Browse files
[Repo Assist] fix: filter compiler-generated types from Info Panel declared types list (#2157)
* fix: filter compiler-generated types from Info Panel declared types list Compiler-generated .NET types such as async state machines (<MethodName>d__0), display classes (<>c__DisplayClass), and F# closure types (MatchClosure@123) were appearing in the Info Panel's 'Declared Types' section when navigating types from assemblies that use async/iterator methods or LINQ. These types are identifiable by their names: compiler-generated names either start with '<' (C#/.NET convention) or contain '@' (F# compiler convention). User-defined generic types like MyType<'T> are not affected because their names do not start with '<'. Closes #1696 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ci: trigger checks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4e0b11f commit 40683b2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/Components/InfoPanel.fs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ module InfoPanel =
129129
let types =
130130
res.DeclaredTypes
131131
|> List.filter (not << String.IsNullOrWhiteSpace)
132+
// Compiler-generated names start with '<' (e.g. <>c__DisplayClass, <MethodName>d__0)
133+
// or contain '@' (F# closure types like MatchClosure@123).
134+
// These are never useful to show in the Info Panel.
135+
|> List.filter (fun t -> not (t.StartsWith("<") || t.Contains("@")))
132136
|> List.distinct
133137
|> fsharpBlock
134138

0 commit comments

Comments
 (0)