teal-language/tl

internals: remove duplicate entries from interface_list

Fermée

#1 018 ouverte le 17 juil. 2025

 (2 commentaires) (0 réaction) (0 personne assignée)Lua (156 forks)batch import
good first issue

Métriques du dépôt

Stars
 (2 808 étoiles)
Métriques de merge PR
 (Merge moyen 1j 6h) (1 PR mergée en 30 j)

Description

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.

Guide contributeur