Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ExprFunctionCall conversion #4986

Merged
merged 4 commits into from
Aug 15, 2022

Conversation

TPGamesNL
Copy link
Member

@TPGamesNL TPGamesNL commented Jul 29, 2022

Description

In #4896, function call expressions were edited to support converting when they were created, but it didn't add conversion support after the ExprFunctionCall was created. This PR adds that and changes the initial return type of ExprFunctionCall to be the either the expected type, or the function return type itself if it is a subclass of the expected types.

Issue reported on Discord, set {_p}'s velocity to vector({_x}, {_y}, {_z}) gave a parse error (not in release, only on master branch).

Also edits an assert in ExprVelocity's change method, because it was wrong


Target Minecraft Versions: any
Requirements: none
Related Issues: #4896 (non-fixing)

@TPGamesNL TPGamesNL added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. 2.6 labels Jul 29, 2022
@TheLimeGlass TheLimeGlass added the functions Related to functions label Aug 15, 2022
@TheLimeGlass TheLimeGlass merged commit adb687d into SkriptLang:master Aug 15, 2022
@TPGamesNL TPGamesNL deleted the fix/function-converting branch August 16, 2022 09:55
TheLimeGlass pushed a commit that referenced this pull request Oct 20, 2022
* Change default return type and implement conversion

(cherry picked from commit adb687d)
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. functions Related to functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants