Skip to content

Conversation

sovdeeth
Copy link
Member

Problem

During the implementation of type properties, I had some issues with determining the possible return types of a converted ExpressionList. If I converted me and {tool} to Player and ItemType, it would give me a EL with the possibleReturnTypes of Player and Object. In getConvertedExpression, it was taking getReturnType of the component expressions and using that for possible return types, rather than asking for possibleReturnTypes to get the most accurate information.

Solution

The solution was to add all the possibleReturnTypes from the elements into a set and use that as the list's possible return types. This avoids unnecessary supertypes and gives the most accurate information.

Testing Completed

Manual confirmation. This will be tested further once type properties is implemented.

Supporting Information


Completes: none
Related: none

@sovdeeth sovdeeth requested review from a team as code owners August 26, 2025 04:00
@sovdeeth sovdeeth added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Aug 26, 2025
@sovdeeth sovdeeth requested review from UnderscoreTud and cheeezburga and removed request for a team August 26, 2025 04:00
@skriptlang-automation skriptlang-automation bot added the needs reviews A PR that needs additional reviews label Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. needs reviews A PR that needs additional reviews
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants