File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
crates/emmylua_code_analysis/src/diagnostic/checker Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 2020
2121### 🐛 Fixed
2222- ** Enum Variable Parameter Issue** : Fixed a crash issue when checking enum variable as parameter
23+ - ** Circle Doc Class Issue** : Fixed a bug that caused the language server to hang when
2324
2425## [ 0.8.1] - 2025-6-14
2526
Original file line number Diff line number Diff line change 1+ use std:: collections:: HashSet ;
2+
13use emmylua_parser:: { LuaAstNode , LuaAstToken , LuaDocTagClass } ;
24use rowan:: TextRange ;
35
@@ -37,9 +39,14 @@ fn check_doc_tag_class(
3739 let name = class_decl. get_full_name ( ) ;
3840
3941 let mut queue = Vec :: new ( ) ;
42+ let mut visited = HashSet :: new ( ) ;
4043
4144 queue. push ( class_decl. get_id ( ) ) ;
4245 while let Some ( current_id) = queue. pop ( ) {
46+ if !visited. insert ( current_id. clone ( ) ) {
47+ continue ;
48+ }
49+
4350 let super_types = type_index. get_super_types ( & current_id) ;
4451 if let Some ( super_types) = super_types {
4552 for super_type in super_types {
@@ -54,7 +61,10 @@ fn check_doc_tag_class(
5461 ) ;
5562 return Some ( ( ) ) ;
5663 }
57- queue. push ( super_type_id. clone ( ) ) ;
64+
65+ if !visited. contains ( super_type_id) {
66+ queue. push ( super_type_id. clone ( ) ) ;
67+ }
5868 }
5969 _ => { }
6070 }
You can’t perform that action at this time.
0 commit comments