Skip to content

Commit 716da7c

Browse files
committed
Fix a crash issue
1 parent 9bdcb8d commit 716da7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

EmmyLua/CodeAnalysis/Compilation/Analyzer/DeclarationAnalyzer/DeclarationContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public void AttachDoc(LuaDocTagSyntax docTagSyntax)
200200

201201
public void SetElementRelatedClosure(LuaSyntaxElement element, LuaClosureExprSyntax closureExprSyntax)
202202
{
203-
_elementRelatedClosure.Add(element.UniqueId, new(closureExprSyntax));
203+
_elementRelatedClosure.TryAdd(element.UniqueId, new(closureExprSyntax));
204204
}
205205

206206
public LuaClosureExprSyntax? GetElementRelatedClosure(LuaSyntaxElement element)

0 commit comments

Comments
 (0)