Skip to content

Commit

Permalink
Fix nil reference exception (#828)
Browse files Browse the repository at this point in the history
Fixes #824.
  • Loading branch information
svermeulen authored Oct 16, 2024
1 parent 0065786 commit b8f9cce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7667,7 +7667,9 @@ do
end
elseif t.typename == "self" then
assert(copy.typename == "self")
copy.display_type, same = resolve(t.display_type, same)
if t.display_type ~= nil then
copy.display_type, same = resolve(t.display_type, same)
end
end

copy.typeid = same and t.typeid or new_typeid()
Expand Down
4 changes: 3 additions & 1 deletion tl.tl
Original file line number Diff line number Diff line change
Expand Up @@ -7667,7 +7667,9 @@ do
end
elseif t is SelfType then
assert(copy is SelfType)
copy.display_type, same = resolve(t.display_type, same)
if t.display_type ~= nil then
copy.display_type, same = resolve(t.display_type, same)
end
end

copy.typeid = same and t.typeid or new_typeid()
Expand Down

0 comments on commit b8f9cce

Please sign in to comment.