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

Parameter names break function type parsing #119

Open
VirtualButFake opened this issue Sep 15, 2023 · 4 comments
Open

Parameter names break function type parsing #119

VirtualButFake opened this issue Sep 15, 2023 · 4 comments
Assignees
Labels
bug Something isn't working version-Luau Issues related to Luau support
Milestone

Comments

@VirtualButFake
Copy link

When parsing a script that contains a function type definition containing a parameter name, Loretta does not parse this correctly

You can reproduce this by trying to parse i.e.:

export type a = (p1: any) -> any

Expected behaviour would be to parse it properly, preserving parameter names
Issue occurs on all syntax options

@VirtualButFake VirtualButFake added the bug Something isn't working label Sep 15, 2023
@GGG-KILLER GGG-KILLER added this to the v0.2.12 milestone Sep 28, 2023
@GGG-KILLER GGG-KILLER self-assigned this Sep 28, 2023
@VirtualButFake
Copy link
Author

VirtualButFake commented Oct 1, 2023

I'd like to expand this issue to also contain the following case:

((Player, ...any) -> ...any)?)

This causes the following errors:
direct
I can't place why but it seems to be related to this.

@GGG-KILLER
Copy link
Member

I'd like to expand this issue to also contain the following case:

((Player, ...any) -> ...any)?)

This causes the following errors: direct I can't place why but it seems to be related to this.

does this fail with the code

export type a = ((Player, ...any) -> ...any)?)

?

@VirtualButFake
Copy link
Author

I'm not able to test for the coming few days - but I'd assume so, considering that type errored when it was used as function return type

@GGG-KILLER GGG-KILLER added the version-Luau Issues related to Luau support label Mar 4, 2024
@TheGreatSageEqualToHeaven
Copy link
Member

Sorry I've been busy I'll take a look at this the coming week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working version-Luau Issues related to Luau support
Projects
Status: Todo
Development

No branches or pull requests

3 participants