Skip to content

Conversation

@Sushil-Rahatole
Copy link
Contributor

This PR avoids duplicate entries in interface_list when collecting interfaces through multiple inheritance paths.

The change preserves the original interface order and does not alter conflict resolution semantics. Only the first occurrence of each interface is retained.

Note: I was not able to run the compiler locally; the change is a minimal refactor that preserves existing behavior.

Fixes #1018.

@github-actions
Copy link

Teal Playground URL: https://1072--teal-playground-preview.netlify.app

@hishamhm
Copy link
Member

Note: I was not able to run the compiler locally

You should be able to run it on a Linux environment like so:

  • install Lua and LuaRocks*
  • check out this repo and run luarocks make --deps-only to install dependencies
  • run make

(* You may also need to install other dependencies for a full development environment, on a Ubuntu environment you can ap install build-essential, for example)

Let us know if these instructions are sufficient or if you need more help!

Comment on lines +1493 to +1498
local function collect_interfaces(
self: Context,
list: {ArrayType | NominalType},
t: RecordLikeType,
seen: {Type: boolean}
): {ArrayType | NominalType}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not change the style of these longer lines. (Same with self.errs:add below.) Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@hishamhm
Copy link
Member

hishamhm commented Feb 1, 2026

Merged manually via 47d784d (which seemed to build upon this PR) — thank you!

@hishamhm hishamhm closed this Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

internals: remove duplicate entries from interface_list

2 participants