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

Parsing error with leading & in a type #877

Open
iamawatermelo opened this issue Jul 19, 2024 · 1 comment
Open

Parsing error with leading & in a type #877

iamawatermelo opened this issue Jul 19, 2024 · 1 comment

Comments

@iamawatermelo
Copy link

local f: & number & string = "hi"

This is valid Luau code:

image

StyLua cannot format it, though:

sarah@localhost ~/project (main) [2]> StyLua example.luau
error: could not format file example.luau: error parsing: error occurred while creating ast: unexpected token `&`. (starting from line 1, character 10 and ending on line 1, character 11)
additional information: expected type after colon
sarah@localhost ~/project (main) [2]> StyLua --version
stylua 0.20.0
sarah@localhost ~/project (main)>

StyLua was installed from aftman.

@JohnnyMorganz
Copy link
Owner

Requires support upstream in full-moon, our Luau parser

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

No branches or pull requests

2 participants