File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -99,9 +99,8 @@ function META:GetHash(visited)--[[#: string]]
9999 end
100100
101101 table_sort (types )
102- local hash = table_concat (types , " |" )
103- visited [self ] = hash
104- return hash
102+ visited [self ] = table_concat (types , " |" )
103+ return visited [self ]--[[ # as string]]
105104end
106105
107106local sort = function (a --[[ #: string]] , b --[[ #: string]] )
@@ -168,7 +167,7 @@ local function find_index(self--[[#: TUnion]], obj--[[#: any]])
168167 for i = 1 , len do
169168 local v = data [i ]--[[ # as any]]
170169
171- -- Early exit if types don't match
170+ -- Check type first before expensive Equal call
172171 if v .Type == obj_type and v :Equal (obj ) then
173172 if obj_type ~= " function" or v :GetFunctionBodyNode () == obj :GetFunctionBodyNode () then
174173 return i
You can’t perform that action at this time.
0 commit comments