teal-language/tl

internals: remove duplicate entries from interface_list

已關閉

#1,018 建立於 2025年7月17日

 (2 則留言) (0 個反應) (0 位負責人)Lua (160 個分叉)batch import
good first issue

倉庫指標

星標
 (2,811 顆星)
PR 合併指標
 (平均合併 1天 6小時) (30 天內合併 1 個 PR)

描述

Reported by @upedd :

One quick question about Teal, when dealing with complex interface hierarchies, sometimes there are duplicate entries in the interface_list of a record type. Is this the expected behavior? See example:

local interface A 
end

local interface B is A
end

local interface C is A
end

-- interface_list of D is now {B, A, C, A} 
local record D is B, C
end

My reply:

it should not hurt in practice, but we should clean it up. The order does matter since that is how conflicts are handled, but basically we should be able to ignore duplicate entries, so {B, A, C} would be the correct list in that case. I'll file an issue to remind myself to clean it up.

貢獻者指南