Skip to content

Add special objects handlers to type processor#279

Merged
CaelmBleidd merged 4 commits into
mainfrom
mforest/ets-special-objects
May 30, 2025
Merged

Add special objects handlers to type processor#279
CaelmBleidd merged 4 commits into
mainfrom
mforest/ets-special-objects

Conversation

@MForest7
Copy link
Copy Markdown
Collaborator

Fixed cases when we cannot infer intersection type for string and Object { length: any } etc.

@MForest7 MForest7 requested a review from Lipen May 21, 2025 10:08
Copy link
Copy Markdown
Member

@Lipen Lipen left a comment

Choose a reason for hiding this comment

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

LGTM

@Lipen
Copy link
Copy Markdown
Member

Lipen commented May 30, 2025

Regarding the introduced "flipping" of arguments to intersect: we probably want to somehow order the type facts (add val EtsTypeFact.rank: Int) and always check that in intersect(f1, f2), f1.rank <= f2.rank, and recursively call intersect(f2, f1) otherwise. This will guarantee that all cases (intersect overloads) are covered for both cases (f1 & f2 and f2 & f1), and there will be no need to duplicate the code (and somehow ensure that duplicates are actually the same).

@CaelmBleidd CaelmBleidd merged commit b02da29 into main May 30, 2025
6 checks passed
@CaelmBleidd CaelmBleidd deleted the mforest/ets-special-objects branch May 30, 2025 13:10
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.

3 participants